]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
htp: fix test
authorVictor Julien <victor@inliniac.net>
Thu, 18 Jun 2015 13:34:46 +0000 (15:34 +0200)
committerVictor Julien <victor@inliniac.net>
Thu, 18 Jun 2015 15:19:45 +0000 (17:19 +0200)
src/app-layer-htp.c

index aed1ddeb47835e065f6401de367aa2c85749c772..d561f0868f98d1330a669f7c4e7aa372942d0312 100644 (file)
@@ -6123,8 +6123,8 @@ int HTPParserTest16(void)
     if (tx == NULL || tx->request_method_number != HTP_M_GET || tx->request_protocol_number != HTP_PROTOCOL_1_1)
     {
         printf("expected method M_GET and got %s: , expected protocol "
-                "HTTP/1.1 and got %s \n", bstr_util_strdup_to_c(tx->request_method),
-                bstr_util_strdup_to_c(tx->request_protocol));
+                "HTTP/1.1 and got %s \n", tx ? bstr_util_strdup_to_c(tx->request_method) : "tx null",
+                tx ? bstr_util_strdup_to_c(tx->request_protocol) : "tx null");
         goto end;
     }