projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d0b4d64
)
Xen: properly bound buffer access when parsing cpu/*/availability
author
Jan Beulich
<JBeulich@suse.com>
Tue, 15 Jan 2013 13:31:43 +0000
(13:31 +0000)
committer
Konrad Rzeszutek Wilk
<konrad.wilk@oracle.com>
Tue, 15 Jan 2013 20:57:02 +0000
(15:57 -0500)
At the same time reduce the local buffers to 16 bytes each.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
drivers/xen/cpu_hotplug.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/xen/cpu_hotplug.c
b/drivers/xen/cpu_hotplug.c
index 4dcfced107f50e41c518405b28747064d62d78bc..084041d42c9adabfc40251546d361ad76d8987e5 100644
(file)
--- a/
drivers/xen/cpu_hotplug.c
+++ b/
drivers/xen/cpu_hotplug.c
@@
-25,10
+25,10
@@
static void disable_hotplug_cpu(int cpu)
static int vcpu_online(unsigned int cpu)
{
int err;
- char dir[
32], state[32
];
+ char dir[
16], state[16
];
sprintf(dir, "cpu/%u", cpu);
- err = xenbus_scanf(XBT_NIL, dir, "availability", "%s", state);
+ err = xenbus_scanf(XBT_NIL, dir, "availability", "%
15
s", state);
if (err != 1) {
if (!xen_initial_domain())
printk(KERN_ERR "XENBUS: Unable to read cpu state\n");