lkml.org 
[lkml]   [2004]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: yam driver null deref
Dave Jones wrote:
> --- linux-2.6.5/drivers/net/hamradio/yam.c~ 2004-04-16 22:24:00.000000000 +0100
> +++ linux-2.6.5/drivers/net/hamradio/yam.c 2004-04-16 22:24:32.000000000 +0100
> @@ -919,9 +919,12 @@
> static int yam_close(struct net_device *dev)
> {
> struct sk_buff *skb;
> - struct yam_port *yp = (struct yam_port *) dev->priv;
> + struct yam_port *yp;
>
> - if (!dev || !yp)
> + if (!dev)
> + return -EINVAL;
> + yp = dev->priv;
> + if (!yp)
> return -EINVAL;


Ditto... dev will never be NULL here. And most likely not dev->priv
either.

Jeff



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:02    [W:0.033 / U:0.808 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site