Browse Source

Ignore empty payload

pull/1239/head
Max Lv 7 years ago
parent
commit
d1018e4ca5
1 changed files with 3 additions and 0 deletions
  1. 3
      src/aead.c

3
src/aead.c

@ -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)

Loading…
Cancel
Save