- Fix handling of "%%".
- Fix length requirement when calling blobmsg_realloc_string_buffer().
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
}
if (cur_var) {
- if (next > str) {
+ if (end > str) {
cur = msg_find_var(call, str);
if (!cur)
continue;
cur_len = end - str;
}
- dest = blobmsg_realloc_string_buffer(buf, cur_len + 1);
+ dest = blobmsg_realloc_string_buffer(buf, len + cur_len + 1);
memcpy(dest + len, cur, cur_len);
len += cur_len;
}