]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
smtp: turn assertions in to debug asserts
authorVictor Julien <vjulien@oisf.net>
Sat, 4 Jun 2022 06:49:41 +0000 (08:49 +0200)
committerVictor Julien <vjulien@oisf.net>
Sat, 18 Jun 2022 14:16:33 +0000 (16:16 +0200)
(cherry picked from commit 77fae275efb54221d9cf3badd25df38eb1ea0b86)

src/app-layer-smtp.c

index d4851ab9fec9b853705696852b7d05945112886e..5ddb37182c49e4dc1435cd431771a5c662a32946 100644 (file)
@@ -1497,7 +1497,7 @@ static int SMTPParse(int direction, Flow *f, SMTPState *state,
     /* toserver */
     if (direction == 0) {
         while (res == 0) {
-            BUG_ON(state->discard_till_lf);
+            DEBUG_VALIDATE_BUG_ON(state->discard_till_lf);
             if (!state->discard_till_lf) {
                 if ((state->current_line_delimiter_len > 0) && (SMTPProcessRequest(state, f, pstate) == -1))
                     SCReturnInt(-1);
@@ -1515,7 +1515,7 @@ static int SMTPParse(int direction, Flow *f, SMTPState *state,
         /* toclient */
     } else {
         while (res == 0) {
-            BUG_ON(state->discard_till_lf);
+            DEBUG_VALIDATE_BUG_ON(state->discard_till_lf);
             if (!state->discard_till_lf) {
                 if ((state->current_line_delimiter_len > 0) &&
                         (SMTPProcessReply(state, f, pstate, thread_data) == -1))