From: Amaury Denoyelle Date: Fri, 13 May 2022 13:33:50 +0000 (+0200) Subject: BUG/MINOR: ncbuf: fix coverity warning on uninit sz_data X-Git-Tag: v2.6-dev10~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b5ca943ff9980c4272b8f6793130c49d9ac7493d;p=thirdparty%2Fhaproxy.git BUG/MINOR: ncbuf: fix coverity warning on uninit sz_data Coverity reports that data block generated by ncb_blk_first() has sz_data field uninitialized. This has no real impact as it has no sense for data block. Set to 0 to hide the warning. This should fix github issue #1695. --- diff --git a/src/ncbuf.c b/src/ncbuf.c index f7ee48913f..4012adcf45 100644 --- a/src/ncbuf.c +++ b/src/ncbuf.c @@ -131,6 +131,7 @@ static struct ncb_blk ncb_blk_first(const struct ncbuf *buf) blk.sz_ptr = ncb_reserved(buf); blk.sz = ncb_read_off(buf, ncb_reserved(buf)); + blk.sz_data = 0; BUG_ON_HOT(blk.sz > ncb_size(buf)); blk.end = ncb_peek(buf, blk.sz);