mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 14:21:25 +02:00
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.
This commit is contained in:
parent
26f221bd55
commit
b5ca943ff9
@ -131,6 +131,7 @@ static struct ncb_blk ncb_blk_first(const struct ncbuf *buf)
|
|||||||
|
|
||||||
blk.sz_ptr = ncb_reserved(buf);
|
blk.sz_ptr = ncb_reserved(buf);
|
||||||
blk.sz = ncb_read_off(buf, ncb_reserved(buf));
|
blk.sz = ncb_read_off(buf, ncb_reserved(buf));
|
||||||
|
blk.sz_data = 0;
|
||||||
BUG_ON_HOT(blk.sz > ncb_size(buf));
|
BUG_ON_HOT(blk.sz > ncb_size(buf));
|
||||||
|
|
||||||
blk.end = ncb_peek(buf, blk.sz);
|
blk.end = ncb_peek(buf, blk.sz);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user