]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: log/cbor: _lf_cbor_encode_byte() explicitly requires non-NULL ctx (again)
authorAurelien DARRAGON <adarragon@haproxy.com>
Tue, 30 Apr 2024 06:55:13 +0000 (08:55 +0200)
committerAurelien DARRAGON <adarragon@haproxy.com>
Tue, 30 Apr 2024 08:10:35 +0000 (10:10 +0200)
commit41d7e82e0f92e7fc17ed26496337d4a9f0dca95c
treed542c386348cfeb581019c89147431a49d033ae2
parent9931a62c3fd5a2252fe603833b717652302af1d5
MINOR: log/cbor: _lf_cbor_encode_byte() explicitly requires non-NULL ctx (again)

The BUG_ON() statement that was added in 9bdea51 ("MINOR: log/cbor:
_lf_cbor_encode_byte() explicitly requires non-NULL ctx") isn't
sufficient as Coverity still thinks the lf_buildctx itself may be NULL
as shown in GH #2554. In fact the original reports complains about the
lf_buildctx itself and I didn't understand it properly, let's add another
check in the BUG_ON() to ensure both cbor_ctx and cbor_ctx->ctx are not
NULL since it is not expected if used properly.
src/log.c