]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: hpack: fix off-by-one in header name encoding length calculation
authorWilly Tarreau <w@1wt.eu>
Tue, 11 Dec 2018 05:46:03 +0000 (06:46 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 11 Dec 2018 05:46:03 +0000 (06:46 +0100)
commit7571015939eb0ab560df0fefc434e273ec9d93ff
tree0482d912cdb65f81fde3a2966797b90af4aee3ba
parent56b0348ea7a31792ade70c4759889895b6d24d38
BUG/MINOR: hpack: fix off-by-one in header name encoding length calculation

In hpack_encode_header() there is a length check to verify that a literal
header name fits in the buffer, but there it an off-by-one in this length
check, which forgets the byte required to mark the encoding type (literal
without indexing). It should be harmless though as it cannot be triggered
since response headers passing through haproxy are limited by the reserve,
which is not the case of the output buffer.

This fix should be backported to 1.8.
src/hpack-enc.c