]> git.ipfire.org Git - thirdparty/suricata.git/commit
util/streaming-buffer: add extra safety check
authorPhilippe Antoine <pantoine@oisf.net>
Thu, 21 Nov 2024 14:20:44 +0000 (15:20 +0100)
committerVictor Julien <vjulien@oisf.net>
Wed, 11 Dec 2024 05:49:35 +0000 (06:49 +0100)
commit9a53ec43b13f0039a083950511a18bf6f408e432
treec72cf6e7c1c96c539d21f11ab9fc583e49a3a1dd
parent8900041405dbb5f9584edae994af2100733fb4be
util/streaming-buffer: add extra safety check

Ticket: 7393

Check if GrowRegionToSize is called with an argument
trying to shrink the region size, and if so do nothing,
ie do not try to shrink, and just return ok.

This way, we avoid a buffer overflow from memeset using an
unsigned having underflowed.
src/util-streaming-buffer.c