From: Stacey Sheldon Date: Sun, 4 Jul 2010 20:19:02 +0000 (-0400) Subject: transport: fix segfault in setup_command_handler() X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=1e0f89841575de2b8b6313825ec8edd8bc7910a0;p=fw%2Fopenocd 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 --- diff --git a/src/openocd.c b/src/openocd.c index bba1e0bf9..04a630741 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++) {