diff --git a/src/stream-tcp-reassemble.c b/src/stream-tcp-reassemble.c index cdde995fcc..09ac0acf7f 100644 --- a/src/stream-tcp-reassemble.c +++ b/src/stream-tcp-reassemble.c @@ -449,6 +449,10 @@ static int ReassembleInsertSegment(TcpStream *stream, TcpSegment *seg, Packet *p int ret_value = 0; char return_seg = FALSE; + if (seg == NULL) { + goto end; + } + if (list_seg == NULL) { SCLogDebug("empty list, inserting seg %p seq %" PRIu32 ", " "len %" PRIu32 "", seg, seg->seq, seg->payload_len); diff --git a/src/util-classification-config.c b/src/util-classification-config.c index 85e5add416..72bcae36f1 100644 --- a/src/util-classification-config.c +++ b/src/util-classification-config.c @@ -236,6 +236,9 @@ int SCClassConfAddClasstype(char *rawstr, uint8_t index, DetectEngineCtx *de_ctx SCLogInfo("pcre_get_substring() failed"); goto error; } + if (ct_priority_str == NULL) { + goto error; + } ct_priority = atoi(ct_priority_str);