diff --git a/0001-Delete-nullptr-Json-Value-constructor-1194.patch b/0001-Delete-nullptr-Json-Value-constructor-1194.patch new file mode 100644 index 0000000000000000000000000000000000000000..b971915e582ce6f288bc8ef261c029bb655f6336 --- /dev/null +++ b/0001-Delete-nullptr-Json-Value-constructor-1194.patch @@ -0,0 +1,25 @@ +From c8453d39d1d98ddafd15267d9d55223cdc48f2b1 Mon Sep 17 00:00:00 2001 +From: nathanruiz +Date: Wed, 24 Jun 2020 07:52:28 +1000 +Subject: [PATCH] Delete nullptr Json::Value constructor (#1194) + +This patch adds an explicit ctor with a std::nullptr_t argument, that is `delete`-d. This keeps Json::Value from exposing a coding error when automatically promoted to a const char* type. +--- + include/json/value.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/include/json/value.h b/include/json/value.h +index dffc51a..df1eba6 100644 +--- a/include/json/value.h ++++ b/include/json/value.h +@@ -342,6 +342,7 @@ public: + Value(const StaticString& value); + Value(const String& value); + Value(bool value); ++ Value(std::nullptr_t ptr) = delete; + Value(const Value& other); + Value(Value&& other); + ~Value(); +-- +2.42.0.windows.2 + diff --git a/jsoncpp.spec b/jsoncpp.spec index c4929ff74a95de94b921bfb9bae9fce7e1df7638..9410fa39d19816857f4cd06a4779cfdd8d5ad944 100644 --- a/jsoncpp.spec +++ b/jsoncpp.spec @@ -1,6 +1,6 @@ Name: jsoncpp Version: 1.9.3 -Release: 7 +Release: 8 Summary: JSON C++ library License: Public Domain or MIT URL: https://github.com/open-source-parsers/jsoncpp @@ -11,6 +11,7 @@ Patch1: 0002-sync-avoid-isprint-because-it-is-locale-specific.patch Patch2: 0003-sync-Add-nullptr-Json-Value-constructor.patch Patch3: 0004-sync-Fix-generation-of-pkg-config-file-with-absolute.patch Patch4: 0005-sync-Fix-c-20-compilation-problem-for-clang10.patch +Patch5: 0001-Delete-nullptr-Json-Value-constructor-1194.patch %description JsonCpp is a C++ library that allows manipulating JSON values, @@ -92,6 +93,9 @@ hardlink -cfv %{buildroot}%{_docdir}/%{name} %changelog +* Wed Dec 27 2023 liubo - 1.9.3-8 +- Delete nullptr Json::Value constructor + * Fri May 12 2023 zhangxin - 1.9.3-7 - Fix c++20 compilation problem for clang10 and fix potential bug due to compiler optimization