Ignore empty payload

This commit is contained in:
Max Lv
2017-02-11 09:12:02 +08:00
parent 3f789cd0a7
commit d1018e4ca5
+3
View File
@@ -586,6 +586,9 @@ aead_chunk_decrypt(cipher_ctx_t *ctx, uint8_t *p, uint8_t *c, uint8_t *n,
mlen = ntohs(*(uint16_t *)len_buf);
mlen = mlen & CHUNK_SIZE_MASK;
if (mlen == 0)
return CRYPTO_ERROR;
size_t chunk_len = 2 * tlen + CHUNK_SIZE_LEN + mlen;
if (*clen < chunk_len)