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:
17d2e4f
)
initialize dest in cmd_add_string() to not segfault on empty strings
author
Felix Fietkau
<nbd@openwrt.org>
Sat, 23 Feb 2013 18:30:01 +0000
(19:30 +0100)
committer
Felix Fietkau
<nbd@openwrt.org>
Sat, 23 Feb 2013 18:30:01 +0000
(19:30 +0100)
hotplug-rule.c
patch
|
blob
|
history
diff --git
a/hotplug-rule.c
b/hotplug-rule.c
index cb31c3f61301a2eb74c702ab9935989921ec078d..1f3189d6f849dc521ffb09b36065f0fe56d9fce5 100644
(file)
--- a/
hotplug-rule.c
+++ b/
hotplug-rule.c
@@
-325,7
+325,7
@@
static void cmd_add_string(const char *pattern, struct blob_attr *msg)
int len = 0;
bool var = false;
- blobmsg_alloc_string_buffer(&b, NULL, 1);
+
dest =
blobmsg_alloc_string_buffer(&b, NULL, 1);
str = alloca(strlen(pattern) + 1);
strcpy(str, pattern);
next = str;