From 73d2349149e03c780226a8c404c8b913aab77553 Mon Sep 17 00:00:00 2001 From: William Metcalf Date: Thu, 20 May 2010 13:09:20 -0500 Subject: [PATCH] Null deref fix for detect-engine-port.c --- src/detect-engine-port.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/detect-engine-port.c b/src/detect-engine-port.c index ba8ae5c0a5..1e354b62bb 100644 --- a/src/detect-engine-port.c +++ b/src/detect-engine-port.c @@ -1330,6 +1330,9 @@ DetectPort *PortParse(char *str) { /* we dup so we can put a nul-termination in it later */ char *port = portdup; + if (port == NULL) { + goto error; + } /* handle the negation case */ if (port[0] == '!') {