projects
/
xen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cd914ce
)
xc_pm: Fix off-by-one error in string array access.
author
Keir Fraser
<keir.fraser@citrix.com>
Sat, 13 Dec 2008 15:04:53 +0000
(15:04 +0000)
committer
Keir Fraser
<keir.fraser@citrix.com>
Sat, 13 Dec 2008 15:04:53 +0000
(15:04 +0000)
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
tools/libxc/xc_pm.c
patch
|
blob
|
history
diff --git
a/tools/libxc/xc_pm.c
b/tools/libxc/xc_pm.c
index 6edb1a210f7f8feee6d333339efa1cfe8e0def53..3b2f314ca20fd5c4826b1dbff5a8221c414f717c 100644
(file)
--- a/
tools/libxc/xc_pm.c
+++ b/
tools/libxc/xc_pm.c
@@
-285,7
+285,7
@@
int xc_set_cpufreq_gov(int xc_handle, int cpuid, char *govname)
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);
}