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] avoid NULL pointer dereference.

To: Tony Breeds <tony@xxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] avoid NULL pointer dereference.
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Thu, 24 Nov 2005 10:18:28 +0000
Cc: Xen Mailing List <xen-devel@xxxxxxxxxxxxxxxxxxx>, Reiner Sailer <sailer@xxxxxxxxxx>
Delivery-date: Thu, 24 Nov 2005 10:13:00 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20051124044830.GJ25348@xxxxxxxxxxxxxxxxxx>
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: <20051124044830.GJ25348@xxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx

On 24 Nov 2005, at 04:48, Tony Breeds wrote:

Hi All,
        xen/common/acm_ops.c, check for a NULL pointer and then
cheerfully dereferences it.

Signed-off-by: Tony Breeds <tony@xxxxxxxxxxxxxxxxxx>

Applied, but nearby code goto's out so I changed the patch to do that.

In fact there seems to be no convention in that function as to whether returning immediately or goto'ing out (and doing dome return-code cooking) is the right thing to do. Should all the returns be goto out's?

If there is an important distinction then a comment describing it ought to be added.

 -- Keir


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

<Prev in Thread] Current Thread [Next in Thread>