]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Pull request #4941: imap: parse_command oob fix
authorDaniil Kolomiiets -X (dkolomii - SOFTSERVE INC at Cisco) <dkolomii@cisco.com>
Thu, 23 Oct 2025 12:31:32 +0000 (12:31 +0000)
committerChris Sherwin (chsherwi) <chsherwi@cisco.com>
Thu, 23 Oct 2025 12:31:32 +0000 (12:31 +0000)
Merge in SNORT/snort3 from ~DKOLOMII/snort3:imap_oob_fix to master

Squashed commit of the following:

commit fd69fd0e106da891013f471051c06cd357bba5ac
Author: Daniil Kolomiiets <dkolomii@cisco.com>
Date:   Wed Oct 15 10:12:23 2025 -0400

    imap: parse_command oob fix

src/service_inspectors/imap/imap_paf.cc

index 82da737e9c1869542747a932bef975e9bad3a9d0..7e6a898c29f7f4aa61745dbfe0097b5d3a594672 100644 (file)
@@ -426,7 +426,7 @@ static inline void parse_command(const uint8_t ch, ImapPafData* pfdata)
                 : IMAP_PAF_VAL_STATE;
         }
     }
-    else if (toupper(ch) == toupper(val))
+    else if (toupper(ch) == toupper(val) && val != '\0')
         pfdata->imap_data_info.next_letter++;
 
     else