summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStacey Sheldon <stac@solidgoldbomb.org>2010-07-04 16:19:02 -0400
committerØyvind Harboe <oyvind.harboe@zylin.com>2010-07-05 09:15:52 +0200
commit1e0f89841575de2b8b6313825ec8edd8bc7910a0 (patch)
treeac8f249f9230edf7c9590a5a83de7c12c078b1ac /src
parentdb8b99aed6b4e6c046bf51853dacd8d511607984 (diff)
downloadopenocd_libswd-1e0f89841575de2b8b6313825ec8edd8bc7910a0.tar.gz
openocd_libswd-1e0f89841575de2b8b6313825ec8edd8bc7910a0.tar.bz2
openocd_libswd-1e0f89841575de2b8b6313825ec8edd8bc7910a0.tar.xz
openocd_libswd-1e0f89841575de2b8b6313825ec8edd8bc7910a0.zip
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 <stac@solidgoldbomb.org>
Diffstat (limited to 'src')
-rw-r--r--src/openocd.c1
1 files changed, 1 insertions, 0 deletions
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++)
{