From 3eea77c22594da0ef795f7216d98c6edd850bb37 Mon Sep 17 00:00:00 2001 From: sun_hai_10 Date: Tue, 24 Sep 2024 11:05:49 +0800 Subject: [PATCH] Take 2 fixing the placement of json_tokener_error_memory in the enum. (cherry picked from commit 5adf298743c2808d92a6076682c989b65f8af2b8) --- ...acement-of-json_tokener_error_memory.patch | 31 +++++++++++++++++++ json-c.spec | 6 +++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 backport-Take-2-fixing-the-placement-of-json_tokener_error_memory.patch diff --git a/backport-Take-2-fixing-the-placement-of-json_tokener_error_memory.patch b/backport-Take-2-fixing-the-placement-of-json_tokener_error_memory.patch new file mode 100644 index 0000000..5a4b261 --- /dev/null +++ b/backport-Take-2-fixing-the-placement-of-json_tokener_error_memory.patch @@ -0,0 +1,31 @@ +From ad8b8afa7d567053b87f2d37ee4a534e13c210c7 Mon Sep 17 00:00:00 2001 +From: Eric Hawicz +Date: Fri, 22 Sep 2023 22:26:21 -0400 +Subject: [PATCH] Take 2 fixing the placement of json_tokener_error_memory in + the enum. (json_tokener_error_size is an actual error, *not* a measure of + the size of the enum!) + +Reference:https://github.com/json-c/json-c/commit/ad8b8afa7d567053b87f2d37ee4a534e13c210c7 +Conflict:NA + +--- + json_tokener.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/json_tokener.h b/json_tokener.h +index 77abc5c18d..cdac3e2afe 100644 +--- a/json_tokener.h ++++ b/json_tokener.h +@@ -40,8 +40,8 @@ enum json_tokener_error + json_tokener_error_parse_string, + json_tokener_error_parse_comment, + json_tokener_error_parse_utf8_string, +- json_tokener_error_memory, +- json_tokener_error_size ++ json_tokener_error_size, /* A string longer than INT32_MAX was passed as input */ ++ json_tokener_error_memory /* Failed to allocate memory */ + }; + + /** +-- +2.43.4 \ No newline at end of file diff --git a/json-c.spec b/json-c.spec index a2ce3c1..abaa63a 100644 --- a/json-c.spec +++ b/json-c.spec @@ -6,7 +6,7 @@ Name: json-c Version: 0.17 -Release: 3 +Release: 4 Summary: JSON implementation in C License: MIT @@ -18,6 +18,7 @@ BuildRequires: cmake gcc ninja-build Patch001: backport-fix-issue-854-Set-error-json_tokener_error_memory-in.patch Patch002: backport-Handle-yet-another-out-of-memory-condition.patch Patch003: backport-Issue-857-fix-a-few-places-where-json_tokener-should.patch +Patch004: backport-Take-2-fixing-the-placement-of-json_tokener_error_memory.patch %description JSON-C implements a reference counting object model that allows you @@ -105,6 +106,9 @@ end %doc %{_pkgdocdir} %changelog +* Tue Sep 24 2024 sunhai - 0.17-4 +- Take 2 fixing the placement of json_tokener_error_memory in the enum. + * Mon Jun 24 2024 liweigang - 0.17-3 - add backport-Handle-yet-another-out-of-memory-condition.patch - add backport-Issue-857-fix-a-few-places-where-json_tokener-should.patch