projects
/
oweals
/
procd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1449913
)
hotplug: validate expression name element
author
Felix Fietkau
<nbd@openwrt.org>
Wed, 13 Feb 2013 16:09:37 +0000
(17:09 +0100)
committer
Felix Fietkau
<nbd@openwrt.org>
Wed, 13 Feb 2013 16:09:44 +0000
(17:09 +0100)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
hotplug-rule.c
patch
|
blob
|
history
diff --git
a/hotplug-rule.c
b/hotplug-rule.c
index 7508b1dd1a70b175492bceddfec1d8f789d2c5d9..7e9c16adff7c25dd1f6a9f8bebddbdd9e58a1e64 100644
(file)
--- a/
hotplug-rule.c
+++ b/
hotplug-rule.c
@@
-306,7
+306,8
@@
static int rule_process_expr(struct blob_attr *cur, struct blob_attr *msg)
bool found;
int ret;
- if (blobmsg_type(cur) != BLOBMSG_TYPE_ARRAY) {
+ if (blobmsg_type(cur) != BLOBMSG_TYPE_ARRAY ||
+ blobmsg_type(blobmsg_data(cur)) != BLOBMSG_TYPE_STRING) {
rule_error(cur, "Unexpected element type");
return -1;
}