]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
smtp: consider file state in file_data inspection limits
authorVictor Julien <victor@inliniac.net>
Mon, 14 Dec 2015 17:34:38 +0000 (18:34 +0100)
committerVictor Julien <victor@inliniac.net>
Wed, 16 Mar 2016 09:26:10 +0000 (10:26 +0100)
src/detect-engine-filedata-smtp.c

index 829832f9dc70fde082c2b6004c479c5b4e02d0e2..2af1fe0dd2370c5679beac1fa554a6c82899ba1f 100644 (file)
@@ -137,7 +137,7 @@ static uint8_t *DetectEngineSMTPGetBufferForTX(uint64_t tx_id,
     if ((smtp_config.content_limit == 0 ||
          curr_file->content_len_so_far < smtp_config.content_limit) &&
         curr_file->content_len_so_far < smtp_config.content_inspect_min_size &&
-        !(flags & STREAM_EOF)) {
+        !(flags & STREAM_EOF) && !(curr_file->state > FILE_STATE_OPENED)) {
         SCLogDebug("we still haven't seen the entire content. "
                    "Let's defer content inspection till we see the "
                    "entire content.");