From b3b7625be52dfedcbb759a951f69d409409d6d66 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Thu, 18 Jun 2015 15:34:46 +0200 Subject: [PATCH] htp: fix test --- src/app-layer-htp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; }