Hi All, xen/common/acm_ops.c, check for a NULL pointer and then cheerfully dereferences it. Signed-off-by: Tony Breeds <tony@bakeyournoodle.com> diff -r 4b6e8661fe2b xen/common/acm_ops.c --- a/xen/common/acm_ops.c Thu Nov 24 01:32:39 2005 +++ b/xen/common/acm_ops.c Thu Nov 24 15:45:57 2005 @@ -172,7 +172,7 @@ } if (subj->ssid == NULL) { put_domain(subj); - ret = -ESRCH; + return -ESRCH; } ssidref1 = ((struct acm_ssid_domain *)(subj->ssid))->ssidref; put_domain(subj); Yours Tony linux.conf.au http://linux.conf.au/ || http://lca2006.linux.org.au/ Jan 23-28 2006 The Australian Linux Technical Conference! _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
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@bakeyournoodle.com>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@lists.xensource.com http://lists.xensource.com/xen-devel