From: Shivani Bhardwaj Date: Wed, 24 Apr 2024 07:17:01 +0000 (+0530) Subject: util/mime: skipped chars should be marked consumed X-Git-Tag: suricata-8.0.0-beta1~1420 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=884400f1ae4e245d59c4843368594797b8863dec;p=thirdparty%2Fsuricata.git util/mime: skipped chars should be marked consumed --- diff --git a/src/util-decode-mime.c b/src/util-decode-mime.c index 533ae971d7..f58a701b01 100644 --- a/src/util-decode-mime.c +++ b/src/util-decode-mime.c @@ -1187,6 +1187,9 @@ static uint32_t ProcessBase64Remainder( for (uint8_t i = 0; i < state->bvr_len; i++) { if (IsBase64Alphabet(state->bvremain[i])) { block[cnt++] = state->bvremain[i]; + } else { + /* any invalid char is skipped over but it is consumed by the parser */ + buf_consumed++; } }