Router: Prevent double-free of SHA256 instances from Noise
This commit is contained in:
12
history.txt
12
history.txt
@ -1,3 +1,15 @@
|
||||
2025-03-22 zzz
|
||||
* Router: Prevent double-free of SHA256 instances from Noise
|
||||
|
||||
2025-03-21 zzz
|
||||
* Build: Add cs man pages, cs, pt_BR, zh_TW eepsite help pages
|
||||
|
||||
2025-03-19 zzz
|
||||
* Build: Remove more files from Debian source tarball
|
||||
* Console: Reduce memory usage in BanlistRenderer
|
||||
* i2psnark: Use torrent name instead of torrent file name in notifications
|
||||
* i2ptunnel: Version the proxy CSS in more places
|
||||
|
||||
2025-03-17 2.8.1 (API 0.9.65) released
|
||||
|
||||
2025-03-14 zzz
|
||||
|
@ -101,6 +101,7 @@ class SymmetricState implements Destroyable, Cloneable {
|
||||
private final byte[] ck;
|
||||
private final byte[] h;
|
||||
private final byte[] prev_h;
|
||||
private boolean isDestroyed;
|
||||
|
||||
/**
|
||||
* Constructs a new symmetric state object.
|
||||
@ -402,7 +403,13 @@ class SymmetricState implements Destroyable, Cloneable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroy() {
|
||||
public synchronized void destroy() {
|
||||
if (isDestroyed) {
|
||||
// prevent double-free of hash
|
||||
//(new Exception("Already destroyed")).printStackTrace();
|
||||
return;
|
||||
}
|
||||
isDestroyed = true;
|
||||
cipher.destroy();
|
||||
hash.reset();
|
||||
Noise.releaseHash(hash);
|
||||
|
@ -19,8 +19,8 @@ public class RouterVersion {
|
||||
public final static String ID = "Git";
|
||||
public final static String VERSION = CoreVersion.VERSION;
|
||||
/** for example: "beta", "alpha", "rc" */
|
||||
public final static String QUALIFIER = "";
|
||||
public final static long BUILD = 0;
|
||||
public final static String QUALIFIER = "-rc";
|
||||
public final static long BUILD = 1;
|
||||
/** for example "-test" */
|
||||
public final static String EXTRA = "";
|
||||
public final static String FULL_VERSION = VERSION + "-" + BUILD + QUALIFIER + EXTRA;
|
||||
|
Reference in New Issue
Block a user