mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Cc: "Forest Bond" <forest@alittletooquiet.net>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Malcolm Priestley" <tvboxspy@gmail.com>,
	"Guillaume Clement" <gclement@baobob.org>,
	"Guido Martínez" <guido@vanguardiasur.com.ar>,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	"Himangi Saraogi" <himangi774@gmail.com>,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: vt6655: wmgr.c:  Fix for possible null pointer dereference
Date: Sun, 14 Dec 2014 14:52:44 -0800	[thread overview]
Message-ID: <1418597564.2674.1.camel@perches.com> (raw)
In-Reply-To: <1418596940-24915-1-git-send-email-rickard_strandqvist@spectrumdigital.se>

On Sun, 2014-12-14 at 23:42 +0100, Rickard Strandqvist wrote:
> There is otherwise a risk of a possible null pointer dereference.
> Was largely found by using a static code analysis program called cppcheck.
[]
> diff --git 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));

This is a function tracing printk.
I think it's better to just remove it.




  reply	other threads:[~2014-12-14 22:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-14 22:42 Rickard Strandqvist
2014-12-14 22:52 ` Joe Perches [this message]
2014-12-14 22:55   ` Rickard Strandqvist

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1418597564.2674.1.camel@perches.com \
    --to=joe@perches.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=forest@alittletooquiet.net \
    --cc=gclement@baobob.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=guido@vanguardiasur.com.ar \
    --cc=himangi774@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=rickard_strandqvist@spectrumdigital.se \
    --cc=tvboxspy@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®