|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [PATH] Fix overflow in xc_set_cpufreq_gov
This fix an overflow on scaling_governor. Recent compilers fail on this
kind of statements.
Signed-off-by: Jean Guyader <jean.guyader@xxxxxxxxxxxxx>
--
Jean Guyader
diff -r 68b76ad4faf7 tools/libxc/xc_pm.c
--- a/tools/libxc/xc_pm.c Thu Dec 11 22:32:20 2008 +0000
+++ b/tools/libxc/xc_pm.c Fri Dec 12 12:14:22 2008 +0000
@@ -285,7 +285,7 @@
sysctl.u.pm_op.cmd = SET_CPUFREQ_GOV;
sysctl.u.pm_op.cpuid = cpuid;
strncpy(scaling_governor, govname, CPUFREQ_NAME_LEN);
- scaling_governor[CPUFREQ_NAME_LEN] = '\0';
+ scaling_governor[CPUFREQ_NAME_LEN - 1] = '\0';
return xc_sysctl(xc_handle, &sysctl);
}
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-devel] [PATH] Fix overflow in xc_set_cpufreq_gov,
Jean Guyader <=
|
|
|
|
|