1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-11-30 13:01:23 +03:00

base64: Use a secure buffer.

Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Aris Adamantiadis
2014-09-01 08:42:01 +02:00
committed by Andreas Schneider
parent 86ae6b2251
commit e9b2d164e0

View File

@@ -82,6 +82,11 @@ ssh_buffer base64_to_bin(const char *source) {
SAFE_FREE(base64);
return NULL;
}
/*
* The base64 buffer often contains sensitive data. Make sure we don't leak
* sensitive data
*/
ssh_buffer_set_secure(buffer);
len = strlen(ptr);
while (len > 4) {