nfqws: prevent out-of-bound access

This commit is contained in:
bol-van 2022-03-25 20:22:15 +03:00
parent 0887fe6f2a
commit 7df1be9d3e

View File

@ -462,7 +462,7 @@ bool QUICDefragCrypto(const uint8_t *clean,size_t clean_len, uint8_t *defrag,siz
if (pos>=clean_len) return false; if (pos>=clean_len) return false;
if ((pos+tvb_get_size(clean[pos])>clean_len)) return false; if ((pos+tvb_get_size(clean[pos])>=clean_len)) return false;
pos += tvb_get_varint(clean+pos, &offset); pos += tvb_get_varint(clean+pos, &offset);
if ((pos+tvb_get_size(clean[pos])>clean_len)) return false; if ((pos+tvb_get_size(clean[pos])>clean_len)) return false;