lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 2 Jun 2014 22:16:21 +0200
From:	Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>
To:	Dan Carpenter <dan.carpenter@...cle.com>
Cc:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Xenia Ragiadakou <burzalodowa@...il.com>,
	Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@...el.com>,
	Ana Rey <anarey@...il.com>,
	Teodora Baluta <teobaluta@...il.com>,
	Andrea Merello <andrea.merello@...il.com>,
	devel@...verdev.osuosl.org,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] staging: rtl8192u: r8192U_core.c: Cleaning up
 uninitialized variables

Hi Dan!


Now this is a bad example because there is nothing really wrong, and I
could not find the original error log :-(


But i get for the testing variable:
drivers/staging/rtl8192u/r8192U_core.c : 4747] :  (style) Variable
'testing' is assigned a value that is never used.


And for the this file i now get:

drivers/staging/rtl8192u/r8192U_core.c : 1014] :  (style) Variable
'ret' is assigned a value that is never used.
drivers/staging/rtl8192u/r8192U_core.c : 1258] :  (error) Possible
null pointer dereference :  dev
drivers/staging/rtl8192u/r8192U_core.c : 1411] :  (style) Variable
'rate_config' is assigned a value that is never used.
drivers/staging/rtl8192u/r8192U_core.c : 1908] :  (portability)
'oldaddr' is of type 'void *'. When using void pointers in
calculations, the behaviour is undefined.
drivers/staging/rtl8192u/r8192U_core.c : 1959] :  (style) Unused variable :  i
drivers/staging/rtl8192u/r8192U_core.c : 2040] ->
[drivers/staging/rtl8192u/r8192U.h : 1129] :  (style, inconclusive)
The struct 'r8192_priv' hides a typedef with the same name.
drivers/staging/rtl8192u/r8192U_core.c : 2041] ->
[drivers/staging/rtl8192u/r8192U_core.c : 2048] :  (warning) Possible
null pointer dereference :  priv - otherwise it is redundant to check
it against null.




But why not test yourself, see:


http://cppcheck.sourceforge.net/


Appropriate arguments to start with are:
cppcheck --force --quiet  --enable=all drivers/staging/rtl8192u/r8192U_core.c


Best regards
Rickard Strandqvist


2014-06-02 9:39 GMT+02:00 Dan Carpenter <dan.carpenter@...cle.com>:
> On Sun, Jun 01, 2014 at 11:05:39PM +0200, Rickard Strandqvist wrote:
>> Hi Dan
>>
>> I agree, this looks strange.
>> Have been looking for a while in history with, to see if the code has
>> been removed. I start my search using cppcheck for over three months
>> ago.
>> But could not find anything. Sorry about that :-(
>>
>> But I'll make a patch that completely removes testing variable then instead?
>
> Yes.  Btw, what do the cppcheck error messages for this look like
> anyway?
>
> regards,
> dan carpenter
>
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ