projects
/
project
/
procd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
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
b157fcd
..
b90ae52
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) {
}
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;
}
memcpy(dest + len, cur, cur_len);
len += cur_len;
}