From: jason taylor Date: Thu, 15 Nov 2018 04:18:52 +0000 (-0500) Subject: profiling: set loop limit to match array size X-Git-Tag: suricata-4.1.1~49 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=683be94830ce733d8b3c66a76b31194b4ac252d3;p=thirdparty%2Fsuricata.git profiling: set loop limit to match array size Signed-off-by: jason taylor --- diff --git a/src/util-profiling.c b/src/util-profiling.c index f68b835870..6e32c05e4c 100644 --- a/src/util-profiling.c +++ b/src/util-profiling.c @@ -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) {