clang fixes for null derefrences

remotes/origin/master-1.0.x
William Metcalf 16 years ago committed by Victor Julien
parent 32a2658233
commit 8d66323f62

@ -196,6 +196,7 @@ static int DetectDistanceTest01(void)
DetectContentData *co = (DetectContentData *)sm->ctx;
if (co == NULL) {
printf("co == NULL: ");
goto end;
}
if (co->distance != 4) {

@ -267,10 +267,12 @@ static int DetectHttpHeaderTest01(void)
de_ctx->sig_list = SigInit(de_ctx, "alert tcp any any -> any any "
"(msg:\"Testing http_header\"; "
"content:one; http_header; sid:1;)");
if (de_ctx->sig_list != NULL)
if (de_ctx->sig_list != NULL) {
result = 1;
else
} else {
printf("Error parsing signature: ");
goto end;
}
sm = de_ctx->sig_list->match;
if (sm != NULL) {

@ -1016,7 +1016,7 @@ static int DetectUriSigTest04(void) {
s->match != NULL)
{
printf("sig 3 failed to parse: ");
DetectContentPrint((DetectContentData *) s->pmatch_tail->ctx);
//DetectContentPrint((DetectContentData *) s->pmatch_tail->ctx);
goto end;
}

@ -2648,7 +2648,7 @@ int SigAddressPrepareStage5(DetectEngineCtx *de_ctx) {
if (global_src_gr->sh != NULL) {
printf(" - ");
for (u = 0; u < global_src_gr->sh->sig_cnt; u++) {
Signature *s = de_ctx->sig_array[global_dst_gr->sh->match_array[u]];
Signature *s = de_ctx->sig_array[global_src_gr->sh->match_array[u]];
printf("%" PRIu32 " ", s->id);
}
printf("\n");

Loading…
Cancel
Save