]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Merge pull request #276 in SNORT/snort3 from crc/svcmap to master
authorRuss Combs (rucombs) <rucombs@cisco.com>
Thu, 18 Feb 2016 17:11:35 +0000 (12:11 -0500)
committerRuss Combs (rucombs) <rucombs@cisco.com>
Thu, 18 Feb 2016 17:11:35 +0000 (12:11 -0500)
Squashed commit of the following:

commit 602998ad8b7c3694135015ca4b43628f289935b6
Author: Russ Combs <rucombs@cisco.com>
Date:   Thu Feb 18 11:40:06 2016 -0500

    fix bounds check

src/detection/service_map.cc

index bfe7beec72dc233a048687d2bd214e4ecb91f55c..b333037d5408bda6fcf1b1d9e84879a43de6a2f3 100644 (file)
@@ -317,7 +317,7 @@ PortGroup* sopg_table_t::get_port_group(
 
     PortGroupVector& v = c2s ? to_srv[proto] : to_cli[proto];
 
-    if ( (unsigned)proto_ordinal > v.size() )
+    if ( (unsigned)proto_ordinal >= v.size() )
         return nullptr;
 
     return v[proto_ordinal];