From: Victor Julien Date: Fri, 19 Jun 2015 11:05:49 +0000 (+0200) Subject: htp: hide BUG_ON's behind DEBUG_VALIDATION X-Git-Tag: suricata-3.0RC1~290 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b8211e8c04f25947ee3bbb1473e8ff75920c9c46;p=thirdparty%2Fsuricata.git htp: hide BUG_ON's behind DEBUG_VALIDATION --- diff --git a/src/app-layer-htp.c b/src/app-layer-htp.c index d561f0868f..8444afe651 100644 --- a/src/app-layer-htp.c +++ b/src/app-layer-htp.c @@ -702,7 +702,9 @@ static int HTPHandleRequestData(Flow *f, void *htp_state, } if (NULL == htp) { +#ifdef DEBUG_VALIDATION BUG_ON(htp == NULL); +#endif /* should never happen if HTPConfigure is properly invoked */ goto error; } @@ -721,7 +723,9 @@ static int HTPHandleRequestData(Flow *f, void *htp_state, } /* the code block above should make sure connp is never NULL here */ +#ifdef DEBUG_VALIDATION BUG_ON(hstate->connp == NULL); +#endif /* Unset the body inspection (the callback should * reactivate it if necessary) */