]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Pull request #3612: reputation: fix for array indexing error when searching for reput...
authorSteven Baigal (sbaigal) <sbaigal@cisco.com>
Thu, 6 Oct 2022 18:55:14 +0000 (18:55 +0000)
committerSteven Baigal (sbaigal) <sbaigal@cisco.com>
Thu, 6 Oct 2022 18:55:14 +0000 (18:55 +0000)
Merge in SNORT/snort3 from ~ALLEWI/snort3:multiple_reputation_entries to master

Squashed commit of the following:

commit e336be1e0cbde17d4fcc00605ccfacfa4147fd48
Author: albert lewis <allewi@cisco.com>
Date:   Mon Oct 3 12:56:51 2022 -0400

    reputation: fix for array indexing error when searching for reputation file entries

src/network_inspectors/reputation/reputation_inspect.cc

index c9054d275a7bba22e8b391086deb9cc4840ce887..9f8d1de4be40c2f5fe2f3465ae4230fabcfb0a38 100644 (file)
@@ -88,7 +88,7 @@ static inline IPdecision get_reputation(const ReputationConfig& config, Reputati
         int i;
         for (i = 0; i < NUM_INDEX_PER_ENTRY; i++)
         {
-            int list_index = rep_info->list_indexes[i];
+            uint8_t list_index = rep_info->list_indexes[i];
             if (!list_index)
                 break;
             list_index--;