diff --git a/src/app-layer-smtp.c b/src/app-layer-smtp.c index c4f1d96edd..d48c23bf11 100644 --- a/src/app-layer-smtp.c +++ b/src/app-layer-smtp.c @@ -1139,6 +1139,13 @@ static int SMTPProcessRequest(SMTPState *state, Flow *f, AppLayerParserState *ps SCEnter(); SMTPTransaction *tx = state->curr_tx; + /* If current input is to be discarded because it completes a long line, + * line's length and delimeter len are reset to 0. Skip processing this line. + * This line is only to get us out of the state where we should discard any + * data till LF. */ + if (line->len == 0 && line->delim_len == 0) { + return 0; + } if (state->curr_tx == NULL || (state->curr_tx->done && !NoNewTx(state, line))) { tx = SMTPTransactionCreate(); if (tx == NULL)