From 21a1c6ec33f87b6285e47ad6597cd49ad89a9485 Mon Sep 17 00:00:00 2001 From: Antonio Borneo Date: Fri, 31 Dec 2010 19:18:11 +0800 Subject: [PATCH] NAND/TCL: fix segfault on syntax error Fix segfault if incomplete command "nand device dummy" is executed. Signed-off-by: Antonio Borneo --- src/flash/nand/tcl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/flash/nand/tcl.c b/src/flash/nand/tcl.c index af91fc89..70584fff 100644 --- a/src/flash/nand/tcl.c +++ b/src/flash/nand/tcl.c @@ -572,7 +572,7 @@ static COMMAND_HELPER(create_nand_device, const char *bank_name, COMMAND_HANDLER(handle_nand_device_command) { - if (CMD_ARGC < 1) + if (CMD_ARGC < 2) { LOG_ERROR("incomplete nand device configuration"); return ERROR_FLASH_BANK_INVALID; -- 2.39.5