]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Pull request #4942: pop: fixing oob in pop_paf search_for_command
authorDaniil Kolomiiets -X (dkolomii - SOFTSERVE INC at Cisco) <dkolomii@cisco.com>
Thu, 23 Oct 2025 20:05:04 +0000 (20:05 +0000)
committerChris Sherwin (chsherwi) <chsherwi@cisco.com>
Thu, 23 Oct 2025 20:05:04 +0000 (20:05 +0000)
Merge in SNORT/snort3 from ~DKOLOMII/snort3:pop_oob_fix to master

Squashed commit of the following:

commit f06464862b154bd1742a19bdb330348519017da4
Author: Daniil Kolomiiets <dkolomii@cisco.com>
Date:   Wed Oct 15 11:35:39 2025 -0400

    pop: fixing oob in pop_paf search_for_command

src/service_inspectors/pop/pop_paf.cc

index 676d7efb83d7a46b33ac5652d5f1b0a7d5094883..cc0607259cc6dfe7fd5642a24582e61ad11da17b 100644 (file)
@@ -61,7 +61,7 @@ static bool search_for_command(PopPafData* pfdata, const uint8_t ch)
             return true;
         }
     }
-    else if (toupper(ch) == toupper(val) )
+    else if (toupper(ch) == toupper(val) && val != '\0')
     {
         pfdata->cmd_state.next_letter++;
     }