projects
/
project
/
procd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
hotplug: validate expression name element
[project/procd.git]
/
hotplug-rule.c
diff --git
a/hotplug-rule.c
b/hotplug-rule.c
index
7508b1d
..
7e9c16a
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;
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;
}
rule_error(cur, "Unexpected element type");
return -1;
}