aboutsummaryrefslogtreecommitdiff
path: root/src/base64.c
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2014-09-01 08:42:01 +0200
committerAndreas Schneider <asn@cryptomilk.org>2014-09-07 10:38:23 +0200
commite9b2d164e0f9c597f55f546b8d62e0c04423fec5 (patch)
tree734677a3f37124c84c332a405bb59c266c9364ce /src/base64.c
parent86ae6b2251dad939cba04b097066cd01fab48583 (diff)
downloadlibssh-e9b2d164e0f9c597f55f546b8d62e0c04423fec5.tar.gz
libssh-e9b2d164e0f9c597f55f546b8d62e0c04423fec5.tar.xz
libssh-e9b2d164e0f9c597f55f546b8d62e0c04423fec5.zip
base64: Use a secure buffer.
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'src/base64.c')
-rw-r--r--src/base64.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/base64.c b/src/base64.c
index e5981f55..2a162d0b 100644
--- a/src/base64.c
+++ b/src/base64.c
@@ -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) {