aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2019-01-25 16:06:20 +0100
committerAndreas Schneider <asn@cryptomilk.org>2019-01-25 16:07:50 +0100
commitd598e4e52a08d91e129dd01fa2bcc2a0bc73d78c (patch)
tree526ad974d4fcf6865a44d23cbecb974c67a63706 /src
parent932102bd134e8548eef3f1893aa0fed444e34582 (diff)
downloadlibssh-d598e4e52a08d91e129dd01fa2bcc2a0bc73d78c.tar.gz
libssh-d598e4e52a08d91e129dd01fa2bcc2a0bc73d78c.tar.xz
libssh-d598e4e52a08d91e129dd01fa2bcc2a0bc73d78c.zip
packet_crypt: Make sure we always operate on initilized memory
Found by MemorySanitizer. Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'src')
-rw-r--r--src/packet_crypt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/packet_crypt.c b/src/packet_crypt.c
index 0f02b7f7..c30264e5 100644
--- a/src/packet_crypt.c
+++ b/src/packet_crypt.c
@@ -150,7 +150,7 @@ unsigned char *ssh_packet_encrypt(ssh_session session, void *data, uint32_t len)
" on at least one blocksize (received %d)", len);
return NULL;
}
- out = malloc(len);
+ out = calloc(1, len);
if (out == NULL) {
return NULL;
}