[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1418596940-24915-1-git-send-email-rickard_strandqvist@spectrumdigital.se>
Date: Sun, 14 Dec 2014 23:42:20 +0100
From: Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>
To: Forest Bond <forest@...ttletooquiet.net>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>,
Malcolm Priestley <tvboxspy@...il.com>,
Guillaume Clement <gclement@...bob.org>,
Guido MartÃnez <guido@...guardiasur.com.ar>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
Himangi Saraogi <himangi774@...il.com>,
Joe Perches <joe@...ches.com>, devel@...verdev.osuosl.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] staging: vt6655: wmgr.c: Fix for possible null pointer dereference
There is otherwise a risk of a possible null pointer dereference.
Was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>
---
drivers/staging/vt6655/wmgr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/vt6655/wmgr.c b/drivers/staging/vt6655/wmgr.c
index c73c39d..f98935c 100644
--- a/drivers/staging/vt6655/wmgr.c
+++ b/drivers/staging/vt6655/wmgr.c
@@ -4391,7 +4391,7 @@ bAdd_PMKID_Candidate(
unsigned int ii = 0;
pr_debug("bAdd_PMKID_Candidate START: (%d)\n",
- (int)pDevice->gsPMKIDCandidate.NumCandidates);
+ (int)(pDevice ? pDevice->gsPMKIDCandidate.NumCandidates : 0));
if ((pDevice == NULL) || (pbyBSSID == NULL) || (psRSNCapObj == NULL))
return false;
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists