Take 2 fixing the placement of json_tokener_error_memory in the enum.

(cherry picked from commit 5adf298743c2808d92a6076682c989b65f8af2b8)
This commit is contained in:
sun_hai_10 2024-09-24 11:05:49 +08:00 committed by openeuler-sync-bot
parent de6f4f35da
commit 3eea77c225
2 changed files with 36 additions and 1 deletions

View File

@ -0,0 +1,31 @@
From ad8b8afa7d567053b87f2d37ee4a534e13c210c7 Mon Sep 17 00:00:00 2001
From: Eric Hawicz <erh+git@nimenees.com>
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

View File

@ -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 <sunhai10@huawei.com> - 0.17-4
- Take 2 fixing the placement of json_tokener_error_memory in the enum.
* Mon Jun 24 2024 liweigang <liweiganga@uniontech.com> - 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