]> git.ipfire.org Git - thirdparty/suricata.git/commit
mpm-ac: fix integer overflow on allocation 2550/head
authorSascha Steinbiss <sascha@steinbiss.name>
Wed, 8 Feb 2017 11:39:06 +0000 (12:39 +0100)
committerVictor Julien <victor@inliniac.net>
Wed, 8 Feb 2017 22:17:12 +0000 (23:17 +0100)
commit5e969779839585dbeae7b103e9e7c9016140159b
tree99f6e12970bf020f28957cf77fa3d483f3c06606
parentb25b067d9333bd1160cae643b47467cb02914446
mpm-ac: fix integer overflow on allocation

The size of a memory buffer to be allocated was kept in a signed int
instead of a size_t, leading to an overflow when large lists of long
and diverse patterns cause the amount of AC states to blow up (>2GB).
Fixes Redmine issues #1827 and #1843.

Signed-off-by: Sascha Steinbiss <sascha@steinbiss.name>
src/util-mpm-ac.c