diff options
Diffstat (limited to 'src/rest.c')
-rw-r--r-- | src/rest.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -5210,10 +5210,14 @@ static int og_cmd_post_repository_add(json_t *element, json_object_foreach(element, key, value) { if (!strcmp(key, "name")) { - err = og_json_parse_string(value, &repo.name); + err = og_json_parse_string_copy(value, + repo.name, + sizeof(repo.name)); params->flags |= OG_REST_PARAM_NAME; } else if (!strcmp(key, "ip")) { - err = og_json_parse_string(value, &repo.ip); + err = og_json_parse_string_copy(value, + repo.ip, + sizeof(repo.ip)); params->flags |= OG_REST_PARAM_ADDR; } |