"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/liblsquic/lsquic_parse_ietf_v1.c" between
lsquic-2.22.1.tar.gz and lsquic-2.23.1.tar.gz

About: LSQUIC is LiteSpeed’s QUIC and HTTP/3 Library. A hint: HTTP/3 uses QUIC as the underlying transport protocol instead of TCP.

lsquic_parse_ietf_v1.c  (lsquic-2.22.1):lsquic_parse_ietf_v1.c  (lsquic-2.23.1)
skipping to change at line 2070 skipping to change at line 2070
uint64_t len; uint64_t len;
int s; int s;
/* Length and frame type have been checked already */ /* Length and frame type have been checked already */
assert(buf_len > 0); assert(buf_len > 0);
assert(buf[0] == 0x30 || buf[0] == 0x31); assert(buf[0] == 0x30 || buf[0] == 0x31);
if (buf[0] & 1) if (buf[0] & 1)
{ {
s = vint_read(buf + 1, buf + buf_len, &len); s = vint_read(buf + 1, buf + buf_len, &len);
if (s > 0 && 1 + s + len >= buf_len) if (s > 0 && 1 + s + len <= buf_len)
{ {
*data = buf + 1 + s; *data = buf + 1 + s;
*data_len = len; *data_len = len;
return 1 + buf_len + len; return 1 + s + len;
} }
else else
return -1; return -1;
} }
else else
{ {
*data = buf + 1; *data = buf + 1;
*data_len = buf_len - 1; *data_len = buf_len - 1;
return buf_len; return buf_len;
} }
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)