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:
4d326e1
)
hotplug-rule: fix off-by-one error in blobmsg string buffer realloc
author
Felix Fietkau
<nbd@openwrt.org>
Wed, 20 Feb 2013 17:46:08 +0000
(18:46 +0100)
committer
Felix Fietkau
<nbd@openwrt.org>
Wed, 20 Feb 2013 17:46:08 +0000
(18:46 +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 b157fcd19bca926ec11a7215eaaa394afa3397b8..b90ae5238c0978adbe0f38e77abec2efb1c585c1 100644
(file)
--- a/
hotplug-rule.c
+++ b/
hotplug-rule.c
@@
-354,7
+354,7
@@
static void cmd_add_string(const char *pattern, struct blob_attr *msg)
}
if (cur_len) {
- dest = blobmsg_realloc_string_buffer(&b, cur_len);
+ dest = blobmsg_realloc_string_buffer(&b, cur_len
+ 1
);
memcpy(dest + len, cur, cur_len);
len += cur_len;
}