WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel][PATCH][ioemu] strip tap subtype prefix from image name (

To: "Keir Fraser" <Keir.Fraser@xxxxxxxxxxxx>
Subject: Re: [Xen-devel][PATCH][ioemu] strip tap subtype prefix from image name (restyled)
From: "Christoph Egger" <Christoph.Egger@xxxxxxx>
Date: Thu, 31 Jan 2008 09:36:30 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, Pat Campbell <plc@xxxxxxxxxx>
Delivery-date: Thu, 31 Jan 2008 00:37:40 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C3C63DEF.1B9FD%Keir.Fraser@xxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <C3C63DEF.1B9FD%Keir.Fraser@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.7
On Wednesday 30 January 2008 15:45:03 Keir Fraser wrote:
> On 30/1/08 14:38, "Christoph Egger" <Christoph.Egger@xxxxxxx> wrote:
> >>   out:
> >> +    free(drv);
> >> +    free(buf);
> >> +    free(bpath);
> >>      free(image);
> >>      free(vec);
> >
> > That doesn't work. If strdup() fails, then drv and buf are NULL here.
> > Analagous counts for the other failures.
> > You need to check for != NULL before calling free().
>
> free() is defined to accept a NULL argument.
>
>  -- Keir

That's right. But that is the way to get in double-free() security holes.

Christoph


-- 
AMD Saxony, Dresden, Germany
Operating System Research Center

Legal Information:
AMD Saxony Limited Liability Company & Co. KG
Sitz (Geschäftsanschrift):
   Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland
Registergericht Dresden: HRA 4896
vertretungsberechtigter Komplementär:
   AMD Saxony LLC (Sitz Wilmington, Delaware, USA)
Geschäftsführer der AMD Saxony LLC:
   Dr. Hans-R. Deppe, Thomas McCoy



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel