On Sat, Apr 21, 2012 at 05:51:41PM +0300, Dan Carpenter wrote:
> On Sat, Apr 21, 2012 at 03:51:44PM +0200, Julia Lawall wrote:
> > Looking for x = ... sizeof(x) ... I get 9 reports. In most cases it
> > looks like sizeof(x) is coincidentally the same as the size that is
> > wanted. Two cases that look like they could have some noticible
> > effect are:
> >
> > arch/xtensa/platforms/iss/network.c, line 789
> > drivers/block/cciss.c, line 4211
> >
>
> Clever. You'd need to restrict it to places where x was a pointer.
> That's better than my check which was specific to kmalloc(). (So
> uh... I'm going to rewrite mine as well to be more generic. :P)
>
The other thing would be to look for places that do:
func(x, sizeof(x);
Of course, you've found a lot of memset()/memcpy() bugs like that in
the past, but probably it could be made more generic so it checks
every function.
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Linux Netdev]
[Kernel Newbies]
[Share Photos]
[IDE]
[Security]
[Git]
[Netfilter]
[Bugtraq]
[Photo]
[Yosemite]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Linux ATA RAID]
[Samba]
[Video 4 Linux]
[Device Mapper]
[Linux Resources]
[Free Dating]