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] [thread-next>] [day] [month] [year] [list]
Message-ID: <1352120454.10947.5.camel@hornet>
Date:	Mon, 05 Nov 2012 13:00:54 +0000
From:	Pawel Moll <pawel.moll@....com>
To:	Lee Jones <lee.jones@...aro.org>
Cc:	Rusty Russell <rusty@...tcorp.com.au>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"virtualization@...ts.linux-foundation.org" 
	<virtualization@...ts.linux-foundation.org>
Subject: Re: [PATCH 6/9] virtio_mmio: Cast &resources[1].start to
 ‘unsigned int *’ to rid compiler
 warning

On Mon, 2012-11-05 at 08:21 +0000, Lee Jones wrote:
> > >  	processed = sscanf(str, "@%lli:%u%n:%d%n",
> > > -			&base, &resources[1].start, &consumed,
> > > +			&base, (unsigned int *)&resources[1].start, &consumed,
> > >  			&vm_cmdline_id, &consumed);
> > 
> > This suppresses a valid warning, leaving our code no less wrong than
> > before.  But now it's silently wrong!
> > 
> > Do you want to try again?
> 
> For sure I'll try again.
> 
> How does `s/%u/%p/` suit?

sscanf doesn't do "%p"... The only reasonable way of fixing this is a
intermediate local variable - will post a patch in a second.

Thanks for spotting this!

Paweł


--
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