]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
profiling: set loop limit to match array size 3554/head
authorjason taylor <jtfas90@gmail.com>
Thu, 15 Nov 2018 04:18:52 +0000 (23:18 -0500)
committerVictor Julien <victor@inliniac.net>
Wed, 21 Nov 2018 08:41:52 +0000 (09:41 +0100)
Signed-off-by: jason taylor <jtfas90@gmail.com>
src/util-profiling.c

index f68b8358706b7cf03e961a389a2b5d320d6d1fd2..6e32c05e4cbb4485be47a42e5f8402abac26187a 100644 (file)
@@ -679,7 +679,7 @@ void SCProfilingDumpPacketStats(void)
     total = 0;
     for (m = 0; m < LOGGER_SIZE; m++) {
         int p;
-        for (p = 0; p < 257; p++) {
+        for (p = 0; p < 256; p++) {
             SCProfilePacketData *pd = &packet_profile_log_data4[m][p];
             total += pd->tot;
             pd = &packet_profile_log_data6[m][p];
@@ -693,7 +693,7 @@ void SCProfilingDumpPacketStats(void)
             "------------------------", "------", "-----", "----------", "------------", "------------", "-----------", "-----------");
     for (m = 0; m < LOGGER_SIZE; m++) {
         int p;
-        for (p = 0; p < 257; p++) {
+        for (p = 0; p < 256; p++) {
             SCProfilePacketData *pd = &packet_profile_log_data4[m][p];
 
             if (pd->cnt == 0) {
@@ -710,7 +710,7 @@ void SCProfilingDumpPacketStats(void)
     }
     for (m = 0; m < LOGGER_SIZE; m++) {
         int p;
-        for (p = 0; p < 257; p++) {
+        for (p = 0; p < 256; p++) {
             SCProfilePacketData *pd = &packet_profile_log_data6[m][p];
 
             if (pd->cnt == 0) {