projects
/
profile
/
ivi
/
jansson.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6e1f4bb
)
Check that target is string and value is not NULL in json_string_set()
author
Petri Lehtinen
<petri@digip.org>
Fri, 17 Jun 2011 18:42:11 +0000
(21:42 +0300)
committer
Petri Lehtinen
<petri@digip.org>
Fri, 17 Jun 2011 18:42:19 +0000
(21:42 +0300)
src/value.c
patch
|
blob
|
history
diff --git
a/src/value.c
b/src/value.c
index
47ebb2c
..
d0517d5
100644
(file)
--- a/
src/value.c
+++ b/
src/value.c
@@
-703,6
+703,9
@@
int json_string_set_nocheck(json_t *json, const char *value)
char *dup;
json_string_t *string;
+ if(!json_is_string(json) || !value)
+ return -1;
+
dup = jsonp_strdup(value);
if(!dup)
return -1;