Unlike other H1 parsing functions, the 3rd parameter of the function
h1_measure_trailers() is the maximum number of bytes to read. For others
functions, it is the relative offset where to stop the parsing.
This patch must be backported to 1.9.
if (h1s->flags & H1S_F_HAVE_I_TLR)
goto skip_tlr_parsing;
- ret = h1_measure_trailers(buf, *ofs, *ofs + max);
+ ret = h1_measure_trailers(buf, *ofs, max);
if (ret > data_space)
ret = (htx_is_empty(htx) ? -1 : 0);
if (ret <= 0)