From 32a2da147b652bd12f25fd568ed1ead5775b1b5b Mon Sep 17 00:00:00 2001 From: William Metcalf Date: Thu, 20 May 2010 13:12:11 -0500 Subject: [PATCH] Null deref fix for detect-engine-iponly.c --- src/detect-engine-iponly.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/detect-engine-iponly.c b/src/detect-engine-iponly.c index 7819eb3d38..44998cb569 100644 --- a/src/detect-engine-iponly.c +++ b/src/detect-engine-iponly.c @@ -615,6 +615,9 @@ int IPOnlyCIDRItemParseSingle(IPOnlyCIDRItem *dd, char *str) /* we dup so we can put a nul-termination in it later */ ip = ipdup; + if (ip == NULL) { + goto error; + } /* handle the negation case */ if (ip[0] == '!') {