Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Oct 2008 15:56:59 GMT
From:      Henning Petersen <henning.petersen@t-online.de>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   arm/128095: Sizeof(pointer) bug .
Message-ID:  <200810141556.m9EFuxdm014658@www.freebsd.org>
Resent-Message-ID: <200810141600.m9EG050M013441@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         128095
>Category:       arm
>Synopsis:       Sizeof(pointer) bug .
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-arm
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Oct 14 16:00:05 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Henning Petersen
>Release:        current-Freebsd
>Organization:
>Environment:
>Description:

>How-To-Repeat:

>Fix:
--- src/sys/arm/xscale/ixp425/if_npe.c	22 Mar 2008 16:53:28 -0000	1.9
+++ src/sys/arm/xscale/ixp425/if_npe.c	14 Oct 2008 06:50:58 -0000
@@ -448,7 +448,7 @@
 {
 	int error, i;
 
-	memset(dma, 0, sizeof(dma));
+	memset(dma, 0, sizeof(*dma));
 
 	dma->name = name;
 	dma->nbuf = nbuf;


Patch attached with submission follows:

Index: src/sys/arm/xscale/ixp425/if_npe.c
===================================================================
RCS file: /usr/ncvs/src/sys/arm/xscale/ixp425/if_npe.c,v
retrieving revision 1.9
diff -u -r1.9 if_npe.c
--- src/sys/arm/xscale/ixp425/if_npe.c	22 Mar 2008 16:53:28 -0000	1.9
+++ src/sys/arm/xscale/ixp425/if_npe.c	14 Oct 2008 06:50:58 -0000
@@ -448,7 +448,7 @@
 {
 	int error, i;
 
-	memset(dma, 0, sizeof(dma));
+	memset(dma, 0, sizeof(*dma));
 
 	dma->name = name;
 	dma->nbuf = nbuf;


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200810141556.m9EFuxdm014658>