From 1e0f89841575de2b8b6313825ec8edd8bc7910a0 Mon Sep 17 00:00:00 2001 From: Stacey Sheldon Date: Sun, 4 Jul 2010 16:19:02 -0400 Subject: [PATCH] transport: fix segfault in setup_command_handler() Commit 93f2afa45f4c dropped the sentinel off the end of the command_registrants[] array. The loop immediately following the initialization will walk right off the end. Signed-off-by: Stacey Sheldon --- src/openocd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/openocd.c b/src/openocd.c index bba1e0bf..04a63074 100644 --- a/src/openocd.c +++ b/src/openocd.c @@ -235,6 +235,7 @@ struct command_context *setup_command_handler(Jim_Interp *interp) &nand_register_commands, &pld_register_commands, &mflash_register_commands, + NULL }; for (unsigned i = 0; NULL != command_registrants[i]; i++) { -- 2.39.5