mirror of
https://github.com/jedisct1/libsodium.git
synced 2026-08-25 08:37:13 +09:00
Add some sodium_memzero
This commit is contained in:
@@ -113,6 +113,7 @@ crypto_secretbox_open_detached(unsigned char *m, const unsigned char *c,
|
||||
return -1;
|
||||
}
|
||||
if (m == NULL) {
|
||||
sodium_memzero(subkey, sizeof subkey);
|
||||
return 0;
|
||||
}
|
||||
ACQUIRE_FENCE;
|
||||
|
||||
@@ -122,6 +122,7 @@ crypto_secretbox_xchacha20poly1305_open_detached(unsigned char *m,
|
||||
return -1;
|
||||
}
|
||||
if (m == NULL) {
|
||||
sodium_memzero(subkey, sizeof subkey);
|
||||
return 0;
|
||||
}
|
||||
ACQUIRE_FENCE;
|
||||
|
||||
Reference in New Issue
Block a user