From 4669be12ad132f17b7ee19715d75c41b8f526b0a Mon Sep 17 00:00:00 2001 From: ckolivas Date: Wed, 20 Jan 2016 23:49:14 +1100 Subject: [PATCH] Make json_set_string UTF8 safe --- src/libckpool.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libckpool.h b/src/libckpool.h index 654bc399..0faf8447 100644 --- a/src/libckpool.h +++ b/src/libckpool.h @@ -369,7 +369,7 @@ static inline void json_strdup(char **buf, json_t *val, const char *key) static inline void _json_set_string(json_t *val, const char *key, const char *str, const char *file, const char *func, const int line) { - if (unlikely(json_object_set_new_nocheck(val, key, json_string(str)))) + if (unlikely(json_object_set_new(val, key, json_string(str)))) LOGERR("Failed to set json string from %s %s:%d", file, func, line); } #define json_set_string(val, key, str) _json_set_string(val, key, str, __FILE__, __func__, __LINE__)