fixed more api and logic erros in recent master

remotes/origin/master-1.0.x
Gurvinder Singh 16 years ago committed by Victor Julien
parent eeb98c6900
commit 3ffbb4c3f4

@ -147,17 +147,15 @@ DetectThresholdData *DetectDetectionFilterParse (char *rawstr) {
seconds_pos = i+1;
}
if (args[count_pos] == NULL) {
goto error;
}
if (ByteExtractStringUint32(&df->count, 10, strlen(args[count_pos]),
if (args[count_pos] == NULL||
ByteExtractStringUint32(&df->count, 10, strlen(args[count_pos]),
args[count_pos]) <= 0)
{
goto error;
}
if (ByteExtractStringUint32(&df->seconds, 10, strlen(args[seconds_pos]),
if (args[seconds_pos] == NULL ||
ByteExtractStringUint32(&df->seconds, 10, strlen(args[seconds_pos]),
args[seconds_pos]) <= 0)
{
goto error;

@ -651,7 +651,7 @@ static int DetectHttpCookieSigTest03(void) {
Packet p;
Signature *s = NULL;
ThreadVars th_v;
DetectEngineThreadCtx *det_ctx;
DetectEngineThreadCtx *det_ctx = NULL;
HtpState *http_state = NULL;
memset(&th_v, 0, sizeof(th_v));
@ -743,7 +743,7 @@ static int DetectHttpCookieSigTest04(void) {
Packet p;
Signature *s = NULL;
ThreadVars th_v;
DetectEngineThreadCtx *det_ctx;
DetectEngineThreadCtx *det_ctx = NULL;
HtpState *http_state = NULL;
memset(&th_v, 0, sizeof(th_v));
@ -835,7 +835,7 @@ static int DetectHttpCookieSigTest05(void) {
Packet p;
Signature *s = NULL;
ThreadVars th_v;
DetectEngineThreadCtx *det_ctx;
DetectEngineThreadCtx *det_ctx = NULL;
HtpState *http_state = NULL;
memset(&th_v, 0, sizeof(th_v));
@ -927,7 +927,7 @@ static int DetectHttpCookieSigTest06(void) {
Packet p;
Signature *s = NULL;
ThreadVars th_v;
DetectEngineThreadCtx *det_ctx;
DetectEngineThreadCtx *det_ctx = NULL;
HtpState *http_state = NULL;
memset(&th_v, 0, sizeof(th_v));
@ -1019,7 +1019,7 @@ static int DetectHttpCookieSigTest07(void) {
Packet p;
Signature *s = NULL;
ThreadVars th_v;
DetectEngineThreadCtx *det_ctx;
DetectEngineThreadCtx *det_ctx = NULL;
HtpState *http_state = NULL;
memset(&th_v, 0, sizeof(th_v));

@ -158,17 +158,15 @@ static DetectThresholdData *DetectThresholdParse (char *rawstr)
second_pos = i+1;
}
if (args[count_pos] == NULL) {
goto error;
}
if (ByteExtractStringUint32(&de->count, 10, strlen(args[count_pos]),
if (args[count_pos] == NULL ||
ByteExtractStringUint32(&de->count, 10, strlen(args[count_pos]),
args[count_pos]) <= 0)
{
goto error;
}
if (ByteExtractStringUint32(&de->seconds, 10, strlen(args[second_pos]),
if (args[second_pos] == NULL ||
ByteExtractStringUint32(&de->seconds, 10, strlen(args[second_pos]),
args[second_pos]) <= 0)
{
goto error;

Loading…
Cancel
Save