X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fprocd.git;a=blobdiff_plain;f=hotplug-rule.c;h=b90ae5238c0978adbe0f38e77abec2efb1c585c1;hp=b157fcd19bca926ec11a7215eaaa394afa3397b8;hb=9f81efba3e70526d7ad15510192ad42b968240c8;hpb=4d326e16578fa2992f3bb6ab21775d4db03558d4 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; }