]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: http-htx: add BUG_ON to prevent API error on http_cookie_register
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 15 Dec 2022 08:27:34 +0000 (09:27 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 15 Dec 2022 10:41:39 +0000 (11:41 +0100)
commit4328b61bb33f99d902eb8bf6b4b8fb6423dbee0b
tree522e95eb4c049ecdf41013f09909173d2796cdb3
parent8f1f1b05795f7114c5bbb0cf3bffdf86ed299370
MINOR: http-htx: add BUG_ON to prevent API error on http_cookie_register

http_cookie_register() must be called on first invocation with the last
two arguments pointing both to a negative value. After it, they will be
updated to a valid index.

We must never have only the last argument as NULL as this will cause an
invalid array addressing. To clarify this a BUG_ON statement is
introduced.

This is linked to github issue #1967.
src/http_htx.c