diff options
author | Michael Clark <michael@metaparadigm.com> | 2014-04-09 13:48:21 +0800 |
---|---|---|
committer | Michael Clark <michael@metaparadigm.com> | 2014-04-09 13:48:21 +0800 |
commit | 64e36901a0614bf64a19bc3396469c66dcd0b015 (patch) | |
tree | 8a897e095b59db5c6e089866ba2b075cd0d3f60a /json_object.h | |
parent | 784534a31f301466d9ab6f8d5b5ccd39a3b9f156 (diff) |
Patch to address the following issues:
* CVE-2013-6371: hash collision denial of service
* CVE-2013-6370: buffer overflow if size_t is larger than int
Diffstat (limited to 'json_object.h')
-rw-r--r-- | json_object.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/json_object.h b/json_object.h index 1005734..200ac40 100644 --- a/json_object.h +++ b/json_object.h @@ -13,6 +13,14 @@ #ifndef _json_object_h_ #define _json_object_h_ +#ifdef __GNUC__ +#define THIS_FUNCTION_IS_DEPRECATED(func) func __attribute__ ((deprecated)) +#elif defined(_MSC_VER) +#define THIS_FUNCTION_IS_DEPRECATED(func) __declspec(deprecated) func +#else +#define THIS_FUNCTION_IS_DEPRECATED(func) func +#endif + #include "json_inttypes.h" #ifdef __cplusplus @@ -279,8 +287,8 @@ extern void json_object_object_add(struct json_object* obj, const char *key, * @returns the json_object associated with the given field name * @deprecated Please use json_object_object_get_ex */ -extern struct json_object* json_object_object_get(struct json_object* obj, - const char *key); +THIS_FUNCTION_IS_DEPRECATED(extern struct json_object* json_object_object_get(struct json_object* obj, + const char *key)); /** Get the json_object associated with a given object field. * |