|
|
|
|
|
|
|
|
|
|
xen-ppc-devel
[XenPPC] [pushed] [ppc] SLOF Workaround
changeset: 9954:2faf0acd35984f1d8d3cc28d6feb990ede3cf7b4
user: jimix@xxxxxxxxxxxxxxxxxxxxx
date: Thu Apr 27 14:30:08 2006 -0400
files: xen/arch/ppc/boot_of.c
description:
[ppc] SLOF Workaround
SLOF does not "null-terminate" the string when generating paths. They
are working on a fix, but it does not hurt to make sure.
diff -r 58118d7883e007931e530b0f0a57c640f8912a03 -r
2faf0acd35984f1d8d3cc28d6feb990ede3cf7b4 xen/arch/ppc/boot_of.c
--- a/xen/arch/ppc/boot_of.c Thu Apr 27 11:25:22 2006 -0400
+++ b/xen/arch/ppc/boot_of.c Thu Apr 27 14:30:08 2006 -0400
@@ -261,6 +261,8 @@ static int __init of_package_to_path(int
return OF_FAILURE;
}
DBG("%s 0x%x %s -> 0x%x\n", __func__, ph, buffer, rets[0]);
+ if (rets[0] <= buflen)
+ buffer[rets[0]] = '\0';
return rets[0];
}
@@ -287,6 +289,8 @@ static int __init of_instance_to_path(in
== OF_FAILURE)
return OF_FAILURE;
+ if (rets[0] <= buflen)
+ buffer[rets[0]] = '\0';
return rets[0];
}
_______________________________________________
Xen-ppc-devel mailing list
Xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ppc-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [XenPPC] [pushed] [ppc] SLOF Workaround,
jimix <=
|
|
|
|
|