fixed smol allocation size

This commit is contained in:
Václav Šmejkal 2024-02-20 17:06:40 +01:00
parent 0525c43b6f
commit f0730dd4fd
Signed by: ENGO150
GPG Key ID: 4A57E86482968843

View File

@ -111,7 +111,7 @@ void append(char **destination, char *key, char *value)
void add_brackets(char **json) void add_brackets(char **json)
{ {
char *output = why2_calloc(strlen(*json) + 3, sizeof(char)); char *output = why2_calloc(strlen(*json) + 4, sizeof(char));
sprintf(output, "{%s}%c", *json, '\0'); sprintf(output, "{%s}%c", *json, '\0');