added null terminating char to add_brackets

This commit is contained in:
Václav Šmejkal 2024-01-27 22:10:32 +01:00
parent 2121ec6786
commit 952658b281
Signed by: ENGO150
GPG Key ID: 4A57E86482968843

View File

@ -112,7 +112,7 @@ void add_brackets(char **json)
{
char *output = why2_calloc(strlen(*json) + 3, sizeof(char));
sprintf(output, "{%s}", *json);
sprintf(output, "{%s}%c", *json, '\0');
why2_deallocate(*json);