Skip to content

Commit

Permalink
util/mime: allow delim len 0 when line limit is hit
Browse files Browse the repository at this point in the history
  • Loading branch information
inashivb authored and victorjulien committed Apr 12, 2023
1 parent c0bff5f commit fd4e0fb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/util-decode-mime.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

#include "suricata-common.h"
#include "suricata.h"
#include "app-layer-smtp.h"
#include "util-decode-mime.h"
#include "util-ip.h"
#include "util-spm-bs.h"
Expand Down Expand Up @@ -1676,7 +1677,7 @@ static int FindMimeHeader(const uint8_t *buf, uint32_t blen,
MimeDecConfig *mdcfg = MimeDecGetConfig();

/* should not get here with incomplete lines */
DEBUG_VALIDATE_BUG_ON(state->current_line_delimiter_len == 0);
DEBUG_VALIDATE_BUG_ON(state->current_line_delimiter_len == 0 && blen < SMTP_LINE_BUFFER_LIMIT);

/* Find first header */
hname = FindMimeHeaderStart(buf, blen, &hlen);
Expand Down

0 comments on commit fd4e0fb

Please sign in to comment.