BUG/MEDIUM: h3: do not crash if no buf space for trailers
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 26 Jan 2023 16:41:58 +0000 (17:41 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 30 Jan 2023 14:38:22 +0000 (15:38 +0100)
commit224ba5cffe6d1e2e1be5968dfc4ad7199f3d5d92
tree261f40b5245621ae84480a09b72f1a1d784ebe3b
parent8436c910f55249895d933ab37f05f99789aa8979
BUG/MEDIUM: h3: do not crash if no buf space for trailers

Replace ABORT_NOW() by proper error management in
h3_resp_trailers_send() for QPACK encoding operation.

If a QPACK encoding operation fails, it means there is not enough space
in qcs buffer. In this case, flag qcs instance with QC_SF_BLK_MROOM and
return an error. MUX is responsible to remove this flag once buffer
space is available.

This should fix the crash reported by gabrieltz on github issue #2006.

This must be backported up to 2.7.
src/h3.c