summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--hotplug-rule.c2
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;
}