From: Victor Julien Date: Mon, 15 Apr 2019 12:52:38 +0000 (+0200) Subject: parse/ip: fix potential oob write in ipv4 validation X-Git-Tag: suricata-5.0.0-beta1~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=666bb1b6e48b47e9fafe161ac57deae8d0fd89f0;p=thirdparty%2Fsuricata.git parse/ip: fix potential oob write in ipv4 validation Found using AFL. --- diff --git a/src/util-ip.c b/src/util-ip.c index 7b568986fb..be127327ed 100644 --- a/src/util-ip.c +++ b/src/util-ip.c @@ -53,7 +53,7 @@ bool IPv4AddressStringIsValid(const char *str) dots++; alen = 0; } else { - if (alen >= 4) { + if (alen >= 3) { SCLogDebug("too long"); return false; }