mirror of
https://github.com/vale981/libblobpack
synced 2025-03-05 09:51:42 -05:00
properly null-terminate formatted json strings
This commit is contained in:
parent
df231e04e1
commit
9a8a7793e2
1 changed files with 2 additions and 0 deletions
|
@ -263,5 +263,7 @@ char *blobmsg_format_json_with_cb(struct blob_attr *attr, bool list, blobmsg_jso
|
|||
return NULL;
|
||||
|
||||
s.buf = realloc(s.buf, s.pos + 1);
|
||||
s.buf[s.pos] = 0;
|
||||
|
||||
return s.buf;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue