From: Victor Julien Date: Tue, 22 Sep 2015 13:20:25 +0000 (+0200) Subject: Fix two more potential issues like bug 1550 X-Git-Tag: suricata-3.0.1RC1~172 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=96ed8d90ee6b6ea4b3ddc475dca125a5b33b2898;p=thirdparty%2Fsuricata.git Fix two more potential issues like bug 1550 --- diff --git a/src/detect-engine-content-inspection.c b/src/detect-engine-content-inspection.c index ae86a3574e..be6d09f6cd 100644 --- a/src/detect-engine-content-inspection.c +++ b/src/detect-engine-content-inspection.c @@ -433,7 +433,7 @@ int DetectEngineContentInspection(DetectEngineCtx *de_ctx, DetectEngineThreadCtx /* if we have dce enabled we will have to use the endianness * specified by the dce header */ - if (data && flags & DETECT_BYTETEST_DCE) { + if (flags & DETECT_BYTETEST_DCE && data != NULL) { DCERPCState *dcerpc_state = (DCERPCState *)data; /* enable the endianness flag temporarily. once we are done * processing we reset the flags to the original value*/ @@ -459,7 +459,7 @@ int DetectEngineContentInspection(DetectEngineCtx *de_ctx, DetectEngineThreadCtx /* if we have dce enabled we will have to use the endianness * specified by the dce header */ - if (flags & DETECT_BYTEJUMP_DCE) { + if (flags & DETECT_BYTEJUMP_DCE && data != NULL) { DCERPCState *dcerpc_state = (DCERPCState *)data; /* enable the endianness flag temporarily. once we are done * processing we reset the flags to the original value*/ @@ -482,7 +482,7 @@ int DetectEngineContentInspection(DetectEngineCtx *de_ctx, DetectEngineThreadCtx /* if we have dce enabled we will have to use the endianness * specified by the dce header */ if ((bed->flags & DETECT_BYTE_EXTRACT_FLAG_ENDIAN) && - endian == DETECT_BYTE_EXTRACT_ENDIAN_DCE) { + endian == DETECT_BYTE_EXTRACT_ENDIAN_DCE && data != NULL) { DCERPCState *dcerpc_state = (DCERPCState *)data; /* enable the endianness flag temporarily. once we are done