summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
8de850b)
A segfault was caused by NULL key.
int json_object_set_new(json_t *json, const char *key, json_t *value)
{
int json_object_set_new(json_t *json, const char *key, json_t *value)
{
- if(!utf8_check_string(key, -1))
+ if(!key || !utf8_check_string(key, -1))
{
json_decref(value);
return -1;
{
json_decref(value);
return -1;