Initialize buffer for decryption

This commit is contained in:
thorkill 2016-05-20 23:19:21 +02:00
parent 44c065ba26
commit af0c289290

View file

@ -515,7 +515,9 @@ static bool sptps_receive_data_datagram(sptps_t *s, const char *data, size_t len
// Decrypt
char buffer[len];
memset(buffer, 0x00, len);
size_t outlen;
// CHECK: If this happens should we restart sptps?
if(!chacha_poly1305_decrypt(s->incipher, seqno, data, len, buffer, &outlen))
return error(s, EIO, "Failed to decrypt and verify packet");