From 324affc316edff9bf690c05a18fb18167c562ca1 Mon Sep 17 00:00:00 2001 From: Ezra Peisach Date: Tue, 7 Apr 2009 17:57:56 +0000 Subject: [PATCH] Null pointer defref in adding info Clearly the code is broken - and we either never use it - or callers never pass NULL... Detected by clang static checker. ticket: 6442 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22172 dc483132-0cff-0310-8789-dd5450dbe970 --- src/util/ss/help.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/ss/help.c b/src/util/ss/help.c index 10b1c1075..981a75fab 100644 --- a/src/util/ss/help.c +++ b/src/util/ss/help.c @@ -107,7 +107,7 @@ void ss_add_info_dir(sci_idx, info_dir, code_ptr) register char **dirs; info = ss_info(sci_idx); - if (info_dir == NULL && *info_dir) { + if ((info_dir == NULL) || (*info_dir == '\0')) { *code_ptr = SS_ET_NO_INFO_DIR; return; } -- 2.26.2