]> git.ipfire.org Git - thirdparty/suricata.git/commit
detect: fix buffer length to uint32
authorMaurizio Abba <mabba@lastline.com>
Tue, 10 Apr 2018 14:37:41 +0000 (15:37 +0100)
committerVictor Julien <victor@inliniac.net>
Mon, 16 Jul 2018 11:30:49 +0000 (13:30 +0200)
commit578c5bfbdcb90b9a20ce607c3074e315c43ed1be
tree33e8269e4e674b3092f467c8a775e04f24ae8f18
parent10b3c840dfd915369f3f33c8bd8128afecc3e1ee
detect: fix buffer length to uint32

There is a difference in the size of the buffer length as passed from
the content buffers (cfr HttpReassembledBody.buffer_len) and the buflen
variable passed to mpm primitives. This can cause a misdetection
whenever the bufferlen is multiple of 65536 (as uint16(X*65536) == 0).
Increasing the buflen variable type to uint32 solves the issue (this
does not cause any issue with primitives, they all accept uint32).
12 files changed:
src/util-mpm-ac-bs.c
src/util-mpm-ac-tile-small.c
src/util-mpm-ac-tile.c
src/util-mpm-ac-tile.h
src/util-mpm-ac.c
src/util-mpm-hs.c
src/util-mpm.h
src/util-spm-bm.c
src/util-spm-bm.h
src/util-spm-hs.c
src/util-spm.c
src/util-spm.h