From a189e1b22dbceedaacf8149c029fab875ba35728 Mon Sep 17 00:00:00 2001 From: Tom Yu Date: Wed, 15 Apr 2009 20:07:26 +0000 Subject: [PATCH] pull up r22172 from trunk ------------------------------------------------------------------------ r22172 | epeisach | 2009-04-07 13:57:56 -0400 (Tue, 07 Apr 2009) | 9 lines Changed paths: M /trunk/src/util/ss/help.c ticket: 6442 subject: 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 version_fixed: 1.7 git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-7@22247 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