[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



Thanks Amos.. I adapted it a little bit.. good catch.. pushed.
-JX
On Aug 17, 2006, at 6:30 PM, Amos Waterland wrote:

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


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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.