commit de88b6724abcb8dc694bc347cf40a79d1d110f0a
parent 04547cd9c8218234a4e0c8175135985b692dc2d6
Author: Christian Grothoff <grothoff@gnunet.org>
Date: Wed, 8 Jul 2026 11:45:28 +0200
check bound before writing in test
Diffstat:
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/tools/perf_replies.c b/src/tools/perf_replies.c
@@ -1978,11 +1978,13 @@ run_mhd (void)
}
if (1)
{
- struct MHD_OptionItem option =
- { MHD_OPTION_END, 0, NULL };
- opt_arr[opt_count] = option;
+ struct MHD_OptionItem option = {
+ MHD_OPTION_END, 0, NULL
+ };
+
if (opt_count >= (sizeof(opt_arr) / sizeof(opt_arr[0])))
abort ();
+ opt_arr[opt_count] = option;
}
d = MHD_start_daemon (flags, mhd_port, NULL, NULL, reply_func, NULL,
MHD_OPTION_ARRAY, opt_arr, MHD_OPTION_END);