public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
To: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>,
	Antoine Schweitzer-Chaput <antoine@schweitzer-chaput.fr>,
	Ana Rey <anarey@gmail.com>, Chaitanya Hazarey <c@24.io>,
	Koray Gulcu <koray.gulcu@ozu.edu.tr>,
	Greg Donald <gdonald@gmail.com>,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] staging: rtl8192u: r8192U_core: Fix for possible null pointer dereference
Date: Mon, 2 Feb 2015 22:21:27 +0530	[thread overview]
Message-ID: <20150202165127.GA30677@sudip-PC> (raw)
In-Reply-To: <1422557952-4209-1-git-send-email-rickard_strandqvist@spectrumdigital.se>

On Thu, Jan 29, 2015 at 07:59:12PM +0100, Rickard Strandqvist wrote:
> Fix a possible null pointer dereference, there is
> otherwise a risk of a possible null pointer dereference.
> 
> This was found using a static code analysis program called cppcheck
> 
> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
> ---
>  drivers/staging/rtl8192u/r8192U_core.c |    8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
> index e031a25..4a29237 100644
> --- a/drivers/staging/rtl8192u/r8192U_core.c
> +++ b/drivers/staging/rtl8192u/r8192U_core.c
> @@ -4476,11 +4476,11 @@ static void query_rxdesc_status(struct sk_buff *skb,
>  
>  	/* for debug 2008.5.29 */
>  
> -	//added by vivi, for MP, 20080108
> -	stats->RxIs40MHzPacket = driver_info->BW;
> -	if (stats->RxDrvInfoSize != 0)
> +	if (driver_info && stats->RxDrvInfoSize != 0) {
> +		//added by vivi, for MP, 20080108
> +		stats->RxIs40MHzPacket = driver_info->BW;
>  		TranslateRxSignalStuff819xUsb(skb, stats, driver_info);
> -
> +	}
but isn't the logic getting changed here?

regards
sudip

>  }

  reply	other threads:[~2015-02-02 16:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-29 18:59 [PATCH v2] staging: rtl8192u: r8192U_core: Fix for possible null pointer dereference Rickard Strandqvist
2015-02-02 16:51 ` Sudip Mukherjee [this message]
2015-02-04 20:05   ` Rickard Strandqvist
2015-02-05 12:27 ` Dan Carpenter
2015-02-05 12:43   ` Sudip Mukherjee
2015-02-05 12:51     ` Dan Carpenter
2015-02-05 17:39       ` Rickard Strandqvist
2015-02-06 14:32         ` Sudip Mukherjee
2015-02-07 13:04           ` 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=20150202165127.GA30677@sudip-PC \
    --to=sudipm.mukherjee@gmail.com \
    --cc=anarey@gmail.com \
    --cc=antoine@schweitzer-chaput.fr \
    --cc=c@24.io \
    --cc=devel@driverdev.osuosl.org \
    --cc=gdonald@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=koray.gulcu@ozu.edu.tr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peter.p.waskiewicz.jr@intel.com \
    --cc=rickard_strandqvist@spectrumdigital.se \
    /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