]> git.feebdaed.xyz Git - 0xmirror/cJSON.git/commitdiff
Release 1.7.18
authorAlanscut <wp_scut@163.com>
Mon, 13 May 2024 09:38:26 +0000 (17:38 +0800)
committerAlan Wang <wp_scut@163.com>
Mon, 13 May 2024 10:26:15 +0000 (18:26 +0800)
CHANGELOG.md
CMakeLists.txt
Makefile
cJSON.c
cJSON.h

index 51261ab52d92cca75e8351aca07b9bd24649b7bb..de1d8e663fda77429bfe8f537d8649e8fc485bd5 100644 (file)
@@ -1,3 +1,13 @@
+1.7.18 (May 13, 2024)
+======
+Fixes:
+------
+* Add NULL check to cJSON_SetValuestring()(CVE-2024-31755), see #839 and #840
+* Remove non-functional list handling of compiler flags, see #851
+* Fix heap buffer overflow, see #852
+* remove misused optimization flag -01, see #854
+* Set free'd pointers to NULL whenever they are not reassigned immediately after, see #855 and #833
+
 1.7.17 (Dec 26, 2023)
 ======
 Fixes:
index 1f2043755a758accee221cb45909856ba63a65dc..36a6cb575609b69706c3a406f678c4fbd15c7a38 100644 (file)
@@ -2,7 +2,7 @@ set(CMAKE_LEGACY_CYGWIN_WIN32 0)
 cmake_minimum_required(VERSION 3.0)
 
 project(cJSON
-    VERSION 1.7.17
+    VERSION 1.7.18
     LANGUAGES C)
 
 cmake_policy(SET CMP0054 NEW)  # set CMP0054 policy
index bc762e05cbdd884eed71bff3e0a63595f41a04f8..00ef80739b604268c791f3366e0ac6eeec26b8d7 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -8,7 +8,7 @@ CJSON_TEST_SRC = cJSON.c test.c
 
 LDLIBS = -lm
 
-LIBVERSION = 1.7.17
+LIBVERSION = 1.7.18
 CJSON_SOVERSION = 1
 UTILS_SOVERSION = 1
 
diff --git a/cJSON.c b/cJSON.c
index 6f55820fb7841c9624fdbd088832b5c1ef2995d9..61483d903c6e77c2e66446532947bad555433de3 100644 (file)
--- a/cJSON.c
+++ b/cJSON.c
@@ -117,7 +117,7 @@ CJSON_PUBLIC(double) cJSON_GetNumberValue(const cJSON * const item)
 }
 
 /* This is a safeguard to prevent copy-pasters from using incompatible C and header files */
-#if (CJSON_VERSION_MAJOR != 1) || (CJSON_VERSION_MINOR != 7) || (CJSON_VERSION_PATCH != 17)
+#if (CJSON_VERSION_MAJOR != 1) || (CJSON_VERSION_MINOR != 7) || (CJSON_VERSION_PATCH != 18)
     #error cJSON.h and cJSON.c have different versions. Make sure that both have the same.
 #endif
 
diff --git a/cJSON.h b/cJSON.h
index 218cc9ea6aff89a152e907e110b49d8617a67cf6..88cf0bcfa274fb686a989ba77f3b16d1aa78be67 100644 (file)
--- a/cJSON.h
+++ b/cJSON.h
@@ -81,7 +81,7 @@ then using the CJSON_API_VISIBILITY flag to "export" the same symbols the way CJ
 /* project version */
 #define CJSON_VERSION_MAJOR 1
 #define CJSON_VERSION_MINOR 7
-#define CJSON_VERSION_PATCH 17
+#define CJSON_VERSION_PATCH 18
 
 #include <stddef.h>