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-ppc-devel

[XenPPC] [PATCH] Fix possible random return value from find_space

To: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Subject: [XenPPC] [PATCH] Fix possible random return value from find_space
From: Amos Waterland <apw@xxxxxxxxxx>
Date: Thu, 17 Aug 2006 18:30:25 -0400
Delivery-date: Thu, 17 Aug 2006 15:33:22 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ppc-devel-request@lists.xensource.com?subject=help>
List-id: Xen PPC development <xen-ppc-devel.lists.xensource.com>
List-post: <mailto:xen-ppc-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-ppc-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.12-2006-07-14
In find_space, if the user passes zero for the size argument she will
get a random value returned.

Signed-off-by: Amos Waterland <apw@xxxxxxxxxx>

---

 boot_of.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -r da9637bef06a xen/arch/powerpc/boot_of.c
--- a/xen/arch/powerpc/boot_of.c        Thu Aug 17 17:58:07 2006 -0400
+++ b/xen/arch/powerpc/boot_of.c        Thu Aug 17 18:28:02 2006 -0400
@@ -698,7 +698,7 @@ static ulong find_space(u32 size, u32 al
 {
     memory_map_t *map = (memory_map_t *)((ulong)mbi->mmap_addr);
     ulong eomem = ((u64)map->length_high << 32) | (u64)map->length_low;
-    ulong base;
+    ulong base = 0x0;
 
     if (size == 0) return base;
 

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

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