]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
profiling: Correct profiling data array size
authorJeff Lucovsky <jlucovsky@oisf.net>
Wed, 16 Oct 2024 14:37:20 +0000 (10:37 -0400)
committerVictor Julien <victor@inliniac.net>
Mon, 21 Oct 2024 18:19:27 +0000 (20:19 +0200)
The profiling arrays are incorrectly sized by the number of thread
modules. Since they contain app-layer protocol data, they should be
sized by ALPROTO_MAX.

src/util-profiling.c

index 295253eca30836a24fce430217695617af5b0991..80d3938bd41f765e9bf14447c4177bb51e9a9bd7 100644 (file)
@@ -72,8 +72,8 @@ SCProfilePacketData packet_profile_data6[257]; /**< all proto's + tunnel */
 SCProfilePacketData packet_profile_tmm_data4[TMM_SIZE][257];
 SCProfilePacketData packet_profile_tmm_data6[TMM_SIZE][257];
 
-SCProfilePacketData packet_profile_app_data4[TMM_SIZE][257];
-SCProfilePacketData packet_profile_app_data6[TMM_SIZE][257];
+SCProfilePacketData packet_profile_app_data4[ALPROTO_MAX][257];
+SCProfilePacketData packet_profile_app_data6[ALPROTO_MAX][257];
 
 SCProfilePacketData packet_profile_app_pd_data4[257];
 SCProfilePacketData packet_profile_app_pd_data6[257];