From 70ceed6e38c7b3b90d7cae3a32d5d0b85bc16d7d Mon Sep 17 00:00:00 2001 From: Jeremy Sowden Date: Tue, 2 Jul 2019 20:53:45 +0100 Subject: [PATCH] wmbiff: fixed possible null-pointer dereference. Signed-off-by: Jeremy Sowden --- wmbiff/wmbiff/passwordMgr.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/wmbiff/wmbiff/passwordMgr.c b/wmbiff/wmbiff/passwordMgr.c index 3faabc3..917291b 100644 --- a/wmbiff/wmbiff/passwordMgr.c +++ b/wmbiff/wmbiff/passwordMgr.c @@ -235,9 +235,11 @@ char *passwordFor(const char *username, const char *servername, Pop3 *pc, return (ret); } /* else fall through, overwrite */ - } else if (pc) { - /* if we've asked, but received nothing, disable this box */ - pc->checkMail = NULL; + } else { + if (pc) { + /* if we've asked, but received nothing, disable this box */ + pc->checkMail = NULL; + } return (NULL); } } else {