projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e4de866
)
xenbus_dev: add missing error check to watch handling
author
Jan Beulich
<
[email protected]
>
Tue, 24 Jan 2012 13:52:42 +0000
(13:52 +0000)
committer
Konrad Rzeszutek Wilk
<
[email protected]
>
Fri, 3 Feb 2012 21:07:05 +0000
(16:07 -0500)
So far only the watch path was checked to be zero terminated, while
the watch token was merely assumed to be.
Signed-off-by: Jan Beulich <
[email protected]
>
Signed-off-by: Konrad Rzeszutek Wilk <
[email protected]
>
drivers/xen/xenbus/xenbus_dev_frontend.c
patch
|
blob
|
history
diff --git
a/drivers/xen/xenbus/xenbus_dev_frontend.c
b/drivers/xen/xenbus/xenbus_dev_frontend.c
index 527dc2a3b89f167cd35cc919bf0da1442c49d238..89f76252a16f20e2638ee578faf4e3cbb4a316c6 100644
(file)
--- a/
drivers/xen/xenbus/xenbus_dev_frontend.c
+++ b/
drivers/xen/xenbus/xenbus_dev_frontend.c
@@
-369,6
+369,10
@@
static int xenbus_write_watch(unsigned msg_type, struct xenbus_file_priv *u)
goto out;
}
token++;
+ if (memchr(token, 0, u->u.msg.len - (token - path)) == NULL) {
+ rc = -EILSEQ;
+ goto out;
+ }
if (msg_type == XS_WATCH) {
watch = alloc_watch_adapter(path, token);