diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2019-01-25 16:06:20 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2019-01-25 16:07:50 +0100 |
commit | d598e4e52a08d91e129dd01fa2bcc2a0bc73d78c (patch) | |
tree | 526ad974d4fcf6865a44d23cbecb974c67a63706 /src | |
parent | 932102bd134e8548eef3f1893aa0fed444e34582 (diff) | |
download | libssh-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.c | 2 |
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; } |