diff options
author | Felix Fietkau <nbd@openwrt.org> | 2013-02-20 18:46:08 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2013-02-20 18:46:08 +0100 |
commit | 9f81efba3e70526d7ad15510192ad42b968240c8 (patch) | |
tree | 37ce986fadc452d2c9a9028c41fcef3498ff4ef8 | |
parent | 4d326e16578fa2992f3bb6ab21775d4db03558d4 (diff) | |
download | unitd-9f81efba3e70526d7ad15510192ad42b968240c8.tar unitd-9f81efba3e70526d7ad15510192ad42b968240c8.zip |
hotplug-rule: fix off-by-one error in blobmsg string buffer realloc
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
-rw-r--r-- | hotplug-rule.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hotplug-rule.c b/hotplug-rule.c index b157fcd..b90ae52 100644 --- 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; } |