From: Victor Julien Date: Thu, 18 Jun 2015 13:34:46 +0000 (+0200) Subject: htp: fix test X-Git-Tag: suricata-3.0RC1~298 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b3b7625be52dfedcbb759a951f69d409409d6d66;p=thirdparty%2Fsuricata.git htp: fix test --- diff --git a/src/app-layer-htp.c b/src/app-layer-htp.c index aed1ddeb47..d561f0868f 100644 --- a/src/app-layer-htp.c +++ b/src/app-layer-htp.c @@ -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; }