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 PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Sun, 30 Sep 2012 10:06:46 +0300 From: Dan Carpenter <dan.carpenter@...cle.com> To: anish kumar <anish198519851985@...il.com> Cc: Anton Vorontsov <cbou@...l.ru>, David Woodhouse <dwmw2@...radead.org>, linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org Subject: Re: [patch] power: battery: pointer math issue in gab_probe() On Sun, Sep 30, 2012 at 09:38:45AM +0530, anish kumar wrote: > On Sat, 2012-09-29 at 10:13 +0300, Dan Carpenter wrote: > > psy->properties is an enum (32 bit type) so adding sizeof() puts us > > four times further along than we intended. It should be cast to a char > > pointer before doing the math. > You really read this driver to find out this one. > Good one. Nah. It's a static checker thing with Smatch (http://smatch.sf.net). When you add pointer + sizeof(), the pointer should always be char. 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