]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
util/mime: skipped chars should be marked consumed
authorShivani Bhardwaj <shivani@oisf.net>
Wed, 24 Apr 2024 07:17:01 +0000 (12:47 +0530)
committerVictor Julien <victor@inliniac.net>
Thu, 25 Apr 2024 04:52:26 +0000 (06:52 +0200)
src/util-decode-mime.c

index 533ae971d774e8f84221a03445f27348d4a55869..f58a701b01e3714465dc0b3c9588f1c866ad86bd 100644 (file)
@@ -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++;
         }
     }