summaryrefslogtreecommitdiffstats
path: root/cli
diff options
context:
space:
mode:
Diffstat (limited to 'cli')
-rw-r--r--cli/src/cli-cmd-system.c2
-rw-r--r--cli/src/cli-xml-output.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/cli/src/cli-cmd-system.c b/cli/src/cli-cmd-system.c
index 8cd15424572..cb3a9ea7484 100644
--- a/cli/src/cli-cmd-system.c
+++ b/cli/src/cli-cmd-system.c
@@ -446,7 +446,7 @@ cli_cmd_sys_exec_cbk(struct cli_state *state, struct cli_cmd_word *word,
dict_t *dict = NULL;
cli_local_t *local = NULL;
- if (wordcount < 3) {
+ if ((wordcount < 3) || (words[2] == NULL)) {
cli_usage_out(word->pattern);
goto out;
}
diff --git a/cli/src/cli-xml-output.c b/cli/src/cli-xml-output.c
index ce5c9cd6cc2..3accd9ce4bf 100644
--- a/cli/src/cli-xml-output.c
+++ b/cli/src/cli-xml-output.c
@@ -64,7 +64,7 @@ cli_begin_xml_output(xmlTextWriterPtr *writer, xmlDocPtr *doc)
int ret = -1;
*writer = xmlNewTextWriterDoc(doc, 0);
- if (writer == NULL) {
+ if (*writer == NULL) {
ret = -1;
goto out;
}