]> git.kaiwu.me - haproxy.git/commit
BUG/MEDIUM: ncbuf: fix null buffer usage
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 16 May 2022 09:09:29 +0000 (11:09 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 16 May 2022 09:28:41 +0000 (11:28 +0200)
commit48fbad45e2642748520f7775b4637776687d92cd
treeb9d49d0c3c98b95534ac7a97764a8abb828a69c8
parent94cd779a4f3f20d5bb10566994c9f55d07e646b7
BUG/MEDIUM: ncbuf: fix null buffer usage

ncbuf public API functions were not ready to deal with a NCBUF_NULL as
parameter. Strenghten these functions by handling it properly.

Most of the functions will consider the buffer as empty and silently
returns. The only exception is ncb_init(buf) which cannot be called
with a NCBUF_NULL. This seems legitimate to consider this as a bug and
not silently failed in this case.
src/ncbuf.c