Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Sep 2011 09:50:09 GMT
From:      Andreas Longwitz <longwitz@incore.de>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: kern/155658: [amr] [patch] amr_ioctl(): call of malloc() causes memory corruption and panic
Message-ID:  <201109130950.p8D9o9Rc000567@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/155658; it has been noted by GNATS.

From: Andreas Longwitz <longwitz@incore.de>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: kern/155658: [amr] [patch] amr_ioctl(): call of malloc() causes
 memory corruption and panic
Date: Tue, 13 Sep 2011 11:43:46 +0200

 It is much better to modify the malloc in the patch in this way:
 
   malloc(max(au_length, MAX_AMR_IOCTL), M_AMR, M_WAITOK|M_ZERO))
 
 Thanks to Adran Chadd for this hint.
 
 
 -- 
 Dr. Andreas Longwitz
 
 Data Service GmbH
 Beethovenstr. 2A
 23617 Stockelsdorf
 Amtsgericht Lübeck, HRB 318 BS
 Geschäftsführer: Wilfried Paepcke, Dr. Andreas Longwitz, Josef Flatau
 



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