[ << | Thread Index | >> ]    [ << | Date Index | >> ]

To: cipe-l,AT,inka,DOT,de
Subject: Re: NULL dereference in cipe_alloc_dev (cipe-1.5.4/cipe/device.c)
From: Olaf Titz <olaf,AT,bigred,DOT,inka,DOT,de>
Date: Sat, 03 Jan 2004 21:51:19 +0100
Organization: private Linux site, southern Germany
References: <20031225035403.GA16079@vequess.mutualwomb>

> Line 548 of device.c ...
>
>     memset(d->broadcast, 0xFF, ETH_ALEN);
>
> ... will dereference a null `d' if there are no Ethernet devices

Fixed in the CVS since some time ago. That was a rather stupid one...

--- device.c    15 Apr 2001 21:25:12 -0000      1.45
+++ device.c    28 Nov 2001 19:16:35 -0000      1.46
@@ -10,7 +10,7 @@
    as published by the Free Software Foundation; either version
    2 of the License, or (at your option) any later version.
 */
-/* $Id: device.c,v 1.45 2001/04/15 21:25:12 olaf Exp $ */
+/* $Id: device.c,v 1.46 2001/11/28 19:16:35 olaf Exp $ */

 #include "cipe.h"
 #include "version.h"
@@ -589,7 +589,7 @@
     /* MAC address will be generated from IP as with PLIP. FC-FC-ip-ip-ip-ip 
*/
     cc->dev.dev_addr[1]=cc->dev.dev_addr[0]=0xFC;
 #endif
-    memset(d->broadcast, 0xFF, ETH_ALEN);
+    memset(cc->dev.broadcast, 0xFF, ETH_ALEN);
     cc->dev.addr_len=ETH_ALEN;

     e=register_netdevice(&(cc->dev));

Olaf


[ << | Thread Index | >> ]    [ << | Date Index | >> ]