From b8211e8c04f25947ee3bbb1473e8ff75920c9c46 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Fri, 19 Jun 2015 13:05:49 +0200 Subject: [PATCH] htp: hide BUG_ON's behind DEBUG_VALIDATION --- src/app-layer-htp.c | 4 ++++ 1 file changed, 4 insertions(+) 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) */