projects
/
platform
/
core
/
system
/
kdbus-bus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
be8571c
)
match: read the name from the right structure
author
Kay Sievers
<kay@vrfy.org>
Thu, 19 Dec 2013 05:34:17 +0000
(06:34 +0100)
committer
Kay Sievers
<kay@vrfy.org>
Thu, 19 Dec 2013 05:34:17 +0000
(06:34 +0100)
match.c
patch
|
blob
|
history
diff --git
a/match.c
b/match.c
index 99743f404d7fc86ea867ee6f270d57453e2e1358..546617a3081080ab0dfc2f1174ffa54609b543d5 100644
(file)
--- a/
match.c
+++ b/
match.c
@@
-427,8
+427,9
@@
int kdbus_match_db_add(struct kdbus_conn *conn, void __user *buf)
case KDBUS_MATCH_NAME_ADD:
case KDBUS_MATCH_NAME_REMOVE:
case KDBUS_MATCH_NAME_CHANGE:
- if (size > 0) {
- ei->name = kstrdup(item->str, GFP_KERNEL);
+ if (size > sizeof(struct kdbus_notify_name_change)) {
+ ei->name = kstrdup(item->name_change.name,
+ GFP_KERNEL);
if (!ei->name)
ret = -ENOMEM;
}