diff options
-rw-r--r-- | cpukit/libmisc/shell/shell_cmdset.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cpukit/libmisc/shell/shell_cmdset.c b/cpukit/libmisc/shell/shell_cmdset.c index be64b83fe4..95f180bbb5 100644 --- a/cpukit/libmisc/shell/shell_cmdset.c +++ b/cpukit/libmisc/shell/shell_cmdset.c @@ -112,6 +112,11 @@ rtems_shell_cmd_t *rtems_shell_add_cmd_struct( rtems_shell_cmd_t **next_ptr = &rtems_shell_first_cmd; rtems_shell_cmd_t *existing; + if (shell_cmd == NULL) + return NULL; + if (shell_cmd->name == NULL) + return NULL; + /* * Iterate through all commands and check if a command with this name is * already present. |