Hello community,

here is the log from the commit of package jsoncpp for openSUSE:Factory checked 
in at 2020-10-26 16:07:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/jsoncpp (Old)
 and      /work/SRC/openSUSE:Factory/.jsoncpp.new.3463 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "jsoncpp"

Mon Oct 26 16:07:44 2020 rev:28 rq:838408 version:1.9.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/jsoncpp/jsoncpp.changes  2020-06-26 
21:45:44.221887460 +0200
+++ /work/SRC/openSUSE:Factory/.jsoncpp.new.3463/jsoncpp.changes        
2020-10-26 16:07:46.302465441 +0100
@@ -1,0 +2,7 @@
+Mon Sep 28 18:11:44 UTC 2020 - Dirk Mueller <dmuel...@suse.com>
+
+- update to 1.9.4:
+  * This patch contains several fixes found through the OSS-Fuzz project
+  fuzzing, increasing the security of the library, 
+
+-------------------------------------------------------------------

Old:
----
  jsoncpp-1.9.3.tar.gz

New:
----
  jsoncpp-1.9.4.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ jsoncpp.spec ++++++
--- /var/tmp/diff_new_pack.HWTRqL/_old  2020-10-26 16:07:46.914466004 +0100
+++ /var/tmp/diff_new_pack.HWTRqL/_new  2020-10-26 16:07:46.918466008 +0100
@@ -18,7 +18,7 @@
 
 %define sover   24
 Name:           jsoncpp
-Version:        1.9.3
+Version:        1.9.4
 Release:        0
 Summary:        C++ library that allows manipulating with JSON
 License:        MIT

++++++ jsoncpp-1.9.3.tar.gz -> jsoncpp-1.9.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jsoncpp-1.9.3/.gitignore new/jsoncpp-1.9.4/.gitignore
--- old/jsoncpp-1.9.3/.gitignore        2020-05-29 15:50:26.000000000 +0200
+++ new/jsoncpp-1.9.4/.gitignore        2020-09-26 04:19:16.000000000 +0200
@@ -28,7 +28,6 @@
 
 # CMake-generated files:
 CMakeFiles/
-*.cmake
 /pkg-config/jsoncpp.pc
 jsoncpp_lib_static.dir/
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jsoncpp-1.9.3/.travis_scripts/cmake_builder.sh 
new/jsoncpp-1.9.4/.travis_scripts/cmake_builder.sh
--- old/jsoncpp-1.9.3/.travis_scripts/cmake_builder.sh  2020-05-29 
15:50:26.000000000 +0200
+++ new/jsoncpp-1.9.4/.travis_scripts/cmake_builder.sh  2020-09-26 
04:19:16.000000000 +0200
@@ -66,7 +66,7 @@
 echo ${CXX}
 ${CXX} --version
 _COMPILER_NAME=`basename ${CXX}`
-if [ "${BUILD_TYPE}" == "shared" ]; then
+if [ "${LIB_TYPE}" = "shared" ]; then
   _CMAKE_BUILD_SHARED_LIBS=ON
 else
   _CMAKE_BUILD_SHARED_LIBS=OFF
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jsoncpp-1.9.3/CMakeLists.txt 
new/jsoncpp-1.9.4/CMakeLists.txt
--- old/jsoncpp-1.9.3/CMakeLists.txt    2020-05-29 15:50:26.000000000 +0200
+++ new/jsoncpp-1.9.4/CMakeLists.txt    2020-09-26 04:19:16.000000000 +0200
@@ -49,6 +49,8 @@
         "Choose the type of build, options are: None Debug Release 
RelWithDebInfo MinSizeRel Coverage.")
 endif()
 
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
+
 # ---------------------------------------------------------------------------
 # use ccache if found, has to be done before project()
 # ---------------------------------------------------------------------------
@@ -59,19 +61,19 @@
     set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE_EXECUTABLE}" CACHE PATH "ccache" 
FORCE)
 endif()
 
-project(JSONCPP
+project(jsoncpp
         # Note: version must be updated in three places when doing a release. 
This
         # annoying process ensures that amalgamate, CMake, and meson all 
report the
         # correct version.
         # 1. ./meson.build
         # 2. ./include/json/version.h
         # 3. ./CMakeLists.txt
-        # IMPORTANT: also update the JSONCPP_SOVERSION!!
-        VERSION 1.9.3 # <major>[.<minor>[.<patch>[.<tweak>]]]
+        # IMPORTANT: also update the PROJECT_SOVERSION!!
+        VERSION 1.9.4 # <major>[.<minor>[.<patch>[.<tweak>]]]
         LANGUAGES CXX)
 
-message(STATUS "JsonCpp Version: 
${JSONCPP_VERSION_MAJOR}.${JSONCPP_VERSION_MINOR}.${JSONCPP_VERSION_PATCH}")
-set(JSONCPP_SOVERSION 24)
+message(STATUS "JsonCpp Version: 
${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
+set(PROJECT_SOVERSION 24)
 
 option(JSONCPP_WITH_TESTS "Compile and (for jsoncpp_check) run JsonCpp test 
executables" ON)
 option(JSONCPP_WITH_POST_BUILD_UNITTEST "Automatically run unit-tests as a 
post build step" ON)
@@ -80,7 +82,9 @@
 option(JSONCPP_WITH_PKGCONFIG_SUPPORT "Generate and install .pc files" ON)
 option(JSONCPP_WITH_CMAKE_PACKAGE "Generate and install cmake package files" 
ON)
 option(JSONCPP_WITH_EXAMPLE "Compile JsonCpp example" OFF)
-option(BUILD_SHARED_LIBS "Build jsoncpp_lib as a shared library." OFF)
+option(BUILD_SHARED_LIBS "Build jsoncpp_lib as a shared library." ON)
+option(BUILD_STATIC_LIBS "Build jsoncpp_lib as a static library." ON)
+option(BUILD_OBJECT_LIBS "Build jsoncpp_lib as a object library." ON)
 
 # Adhere to GNU filesystem layout conventions
 include(GNUInstallDirs)
@@ -146,6 +150,11 @@
 endif()
 
 if(JSONCPP_WITH_PKGCONFIG_SUPPORT)
+    include(JoinPaths)
+
+    join_paths(libdir_for_pc_file "\${exec_prefix}" "${CMAKE_INSTALL_LIBDIR}")
+    join_paths(includedir_for_pc_file "\${prefix}" 
"${CMAKE_INSTALL_INCLUDEDIR}")
+
     configure_file(
         "pkg-config/jsoncpp.pc.in"
         "pkg-config/jsoncpp.pc"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jsoncpp-1.9.3/cmake/JoinPaths.cmake 
new/jsoncpp-1.9.4/cmake/JoinPaths.cmake
--- old/jsoncpp-1.9.3/cmake/JoinPaths.cmake     1970-01-01 01:00:00.000000000 
+0100
+++ new/jsoncpp-1.9.4/cmake/JoinPaths.cmake     2020-09-26 04:19:16.000000000 
+0200
@@ -0,0 +1,23 @@
+# This module provides a function for joining paths
+# known from most languages
+#
+# SPDX-License-Identifier: (MIT OR CC0-1.0)
+# Copyright 2020 Jan Tojnar
+# https://github.com/jtojnar/cmake-snips
+#
+# Modelled after Python’s os.path.join
+# https://docs.python.org/3.7/library/os.path.html#os.path.join
+# Windows not supported
+function(join_paths joined_path first_path_segment)
+    set(temp_path "${first_path_segment}")
+    foreach(current_segment IN LISTS ARGN)
+        if(NOT ("${current_segment}" STREQUAL ""))
+            if(IS_ABSOLUTE "${current_segment}")
+                set(temp_path "${current_segment}")
+            else()
+                set(temp_path "${temp_path}/${current_segment}")
+            endif()
+        endif()
+    endforeach()
+    set(${joined_path} "${temp_path}" PARENT_SCOPE)
+endfunction()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jsoncpp-1.9.3/include/json/value.h 
new/jsoncpp-1.9.4/include/json/value.h
--- old/jsoncpp-1.9.3/include/json/value.h      2020-05-29 15:50:26.000000000 
+0200
+++ new/jsoncpp-1.9.4/include/json/value.h      2020-09-26 04:19:16.000000000 
+0200
@@ -342,6 +342,7 @@
   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();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jsoncpp-1.9.3/include/json/version.h 
new/jsoncpp-1.9.4/include/json/version.h
--- old/jsoncpp-1.9.3/include/json/version.h    2020-05-29 15:50:26.000000000 
+0200
+++ new/jsoncpp-1.9.4/include/json/version.h    2020-09-26 04:19:16.000000000 
+0200
@@ -9,7 +9,7 @@
 // 3. /CMakeLists.txt
 // IMPORTANT: also update the SOVERSION!!
 
-#define JSONCPP_VERSION_STRING "1.9.3"
+#define JSONCPP_VERSION_STRING "1.9.4"
 #define JSONCPP_VERSION_MAJOR 1
 #define JSONCPP_VERSION_MINOR 9
 #define JSONCPP_VERSION_PATCH 3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jsoncpp-1.9.3/meson.build 
new/jsoncpp-1.9.4/meson.build
--- old/jsoncpp-1.9.3/meson.build       2020-05-29 15:50:26.000000000 +0200
+++ new/jsoncpp-1.9.4/meson.build       2020-09-26 04:19:16.000000000 +0200
@@ -9,7 +9,7 @@
   # 2. /include/json/version.h
   # 3. /CMakeLists.txt
   # IMPORTANT: also update the SOVERSION!!
-  version : '1.9.3',
+  version : '1.9.4',
   default_options : [
     'buildtype=release',
     'cpp_std=c++11',
@@ -73,7 +73,7 @@
   subdir_done()
 endif
 
-python = import('python').find_installation('python3')
+python = import('python').find_installation()
 
 jsoncpp_test = executable(
   'jsoncpp_test', files([
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jsoncpp-1.9.3/pkg-config/jsoncpp.pc.in 
new/jsoncpp-1.9.4/pkg-config/jsoncpp.pc.in
--- old/jsoncpp-1.9.3/pkg-config/jsoncpp.pc.in  2020-05-29 15:50:26.000000000 
+0200
+++ new/jsoncpp-1.9.4/pkg-config/jsoncpp.pc.in  2020-09-26 04:19:16.000000000 
+0200
@@ -1,7 +1,7 @@
 prefix=@CMAKE_INSTALL_PREFIX@
 exec_prefix=@CMAKE_INSTALL_PREFIX@
-libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
-includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
+libdir=@libdir_for_pc_file@
+includedir=@includedir_for_pc_file@
 
 Name: jsoncpp
 Description: A C++ library for interacting with JSON
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jsoncpp-1.9.3/src/jsontestrunner/CMakeLists.txt 
new/jsoncpp-1.9.4/src/jsontestrunner/CMakeLists.txt
--- old/jsoncpp-1.9.3/src/jsontestrunner/CMakeLists.txt 2020-05-29 
15:50:26.000000000 +0200
+++ new/jsoncpp-1.9.4/src/jsontestrunner/CMakeLists.txt 2020-09-26 
04:19:16.000000000 +0200
@@ -19,8 +19,10 @@
     else()
         add_definitions(-DJSON_DLL)
     endif()
+    target_link_libraries(jsontestrunner_exe jsoncpp_lib)
+else()
+    target_link_libraries(jsontestrunner_exe jsoncpp_static)
 endif()
-target_link_libraries(jsontestrunner_exe jsoncpp_lib)
 
 set_target_properties(jsontestrunner_exe PROPERTIES OUTPUT_NAME 
jsontestrunner_exe)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jsoncpp-1.9.3/src/lib_json/CMakeLists.txt 
new/jsoncpp-1.9.4/src/lib_json/CMakeLists.txt
--- old/jsoncpp-1.9.3/src/lib_json/CMakeLists.txt       2020-05-29 
15:50:26.000000000 +0200
+++ new/jsoncpp-1.9.4/src/lib_json/CMakeLists.txt       2020-09-26 
04:19:16.000000000 +0200
@@ -50,7 +50,7 @@
 
 source_group("Public API" FILES ${PUBLIC_HEADERS})
 
-set(jsoncpp_sources
+set(JSONCPP_SOURCES
     json_tool.h
     json_reader.cpp
     json_valueiterator.inl
@@ -65,32 +65,10 @@
     set(INSTALL_EXPORT)
 endif()
 
-
-if(BUILD_SHARED_LIBS)
-    if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.12.0)
-        add_compile_definitions(JSON_DLL_BUILD)
-    else()
-        add_definitions(-DJSON_DLL_BUILD)
-    endif()
-endif()
-
-add_library(jsoncpp_lib ${PUBLIC_HEADERS} ${jsoncpp_sources})
-set_target_properties( jsoncpp_lib PROPERTIES
-    OUTPUT_NAME jsoncpp
-    VERSION ${JSONCPP_VERSION}
-    SOVERSION ${JSONCPP_SOVERSION}
-    POSITION_INDEPENDENT_CODE ON
-)
-
-# Set library's runtime search path on OSX
-if(APPLE)
-    set_target_properties(jsoncpp_lib PROPERTIES INSTALL_RPATH 
"@loader_path/.")
-endif()
-
 # Specify compiler features required when compiling a given target.
 # See 
https://cmake.org/cmake/help/v3.1/prop_gbl/CMAKE_CXX_KNOWN_FEATURES.html#prop_gbl:CMAKE_CXX_KNOWN_FEATURES
 # for complete list of features available
-target_compile_features(jsoncpp_lib PUBLIC
+list(APPEND REQUIRED_FEATURES
         cxx_std_11 # Compiler mode is aware of C++ 11.
         #MSVC 1900 cxx_alignas # Alignment control alignas, as defined in 
N2341.
         #MSVC 1900 cxx_alignof # Alignment control alignof, as defined in 
N2341.
@@ -137,16 +115,106 @@
         cxx_variadic_templates # Variadic templates, as defined in N2242.
 )
 
-install(TARGETS jsoncpp_lib ${INSTALL_EXPORT}
+
+if(BUILD_SHARED_LIBS)
+    if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.12.0)
+        add_compile_definitions(JSON_DLL_BUILD)
+    else()
+        add_definitions(-DJSON_DLL_BUILD)
+    endif()
+
+    set(SHARED_LIB ${PROJECT_NAME}_lib)
+    add_library(${SHARED_LIB} SHARED ${PUBLIC_HEADERS} ${JSONCPP_SOURCES})
+    set_target_properties(${SHARED_LIB} PROPERTIES
+        OUTPUT_NAME jsoncpp
+        VERSION ${PROJECT_VERSION}
+        SOVERSION ${PROJECT_SOVERSION}
+        POSITION_INDEPENDENT_CODE ON
+    )
+
+    # Set library's runtime search path on OSX
+    if(APPLE)
+        set_target_properties(${SHARED_LIB} PROPERTIES INSTALL_RPATH 
"@loader_path/.")
+    endif()
+
+    target_compile_features(${SHARED_LIB} PUBLIC ${REQUIRED_FEATURES})
+
+    if(NOT CMAKE_VERSION VERSION_LESS 2.8.11)
+        target_include_directories(${SHARED_LIB} PUBLIC
+            $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
+            $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/${JSONCPP_INCLUDE_DIR}>
+            $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include/json>
+        )
+    endif()
+
+    list(APPEND CMAKE_TARGETS ${SHARED_LIB})
+endif()
+
+if(BUILD_STATIC_LIBS)
+    set(STATIC_LIB ${PROJECT_NAME}_static)
+    add_library(${STATIC_LIB} STATIC ${PUBLIC_HEADERS} ${JSONCPP_SOURCES})
+
+    # avoid name clashes on windows as the shared import lib is alse named 
jsoncpp.lib
+    if(NOT DEFINED STATIC_SUFFIX AND BUILD_SHARED_LIBS)
+        set(STATIC_SUFFIX "_static")
+    endif()
+
+    set_target_properties(${STATIC_LIB} PROPERTIES
+        OUTPUT_NAME jsoncpp${STATIC_SUFFIX}
+        VERSION ${PROJECT_VERSION}
+    )
+
+    # Set library's runtime search path on OSX
+    if(APPLE)
+        set_target_properties(${STATIC_LIB} PROPERTIES INSTALL_RPATH 
"@loader_path/.")
+    endif()
+
+    target_compile_features(${STATIC_LIB} PUBLIC ${REQUIRED_FEATURES})
+
+    if(NOT CMAKE_VERSION VERSION_LESS 2.8.11)
+        target_include_directories(${STATIC_LIB} PUBLIC
+            $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
+            $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/${JSONCPP_INCLUDE_DIR}>
+            $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include/json>
+        )
+    endif()
+
+    list(APPEND CMAKE_TARGETS ${STATIC_LIB})
+endif()
+
+if(BUILD_OBJECT_LIBS)
+    set(OBJECT_LIB ${PROJECT_NAME}_object)
+    add_library(${OBJECT_LIB} OBJECT ${PUBLIC_HEADERS} ${JSONCPP_SOURCES})
+
+    set_target_properties(${OBJECT_LIB} PROPERTIES
+        OUTPUT_NAME jsoncpp
+        VERSION ${PROJECT_VERSION}
+        SOVERSION ${PROJECT_SOVERSION}
+        POSITION_INDEPENDENT_CODE ON
+    )
+
+    # Set library's runtime search path on OSX
+    if(APPLE)
+        set_target_properties(${OBJECT_LIB} PROPERTIES INSTALL_RPATH 
"@loader_path/.")
+    endif()
+
+    target_compile_features(${OBJECT_LIB} PUBLIC ${REQUIRED_FEATURES})
+
+    if(NOT CMAKE_VERSION VERSION_LESS 2.8.11)
+        target_include_directories(${OBJECT_LIB} PUBLIC
+            $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
+            $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/${JSONCPP_INCLUDE_DIR}>
+            $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include/json>
+        )
+    endif()
+
+    list(APPEND CMAKE_TARGETS ${OBJECT_LIB})
+endif()
+
+install(TARGETS ${CMAKE_TARGETS} ${INSTALL_EXPORT}
     RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
     LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
     ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+    OBJECTS DESTINATION ${CMAKE_INSTALL_LIBDIR}
 )
 
-if(NOT CMAKE_VERSION VERSION_LESS 2.8.11)
-    target_include_directories(jsoncpp_lib PUBLIC
-        $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
-        $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/${JSONCPP_INCLUDE_DIR}>
-        $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include/json>
-    )
-endif()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jsoncpp-1.9.3/src/lib_json/json_reader.cpp 
new/jsoncpp-1.9.4/src/lib_json/json_reader.cpp
--- old/jsoncpp-1.9.3/src/lib_json/json_reader.cpp      2020-05-29 
15:50:26.000000000 +0200
+++ new/jsoncpp-1.9.4/src/lib_json/json_reader.cpp      2020-09-26 
04:19:16.000000000 +0200
@@ -1175,8 +1175,11 @@
     if (features_.allowSingleQuotes_) {
       token.type_ = tokenString;
       ok = readStringSingleQuote();
-      break;
-    } // else fall through
+    } else {
+      // If we don't allow single quotes, this is a failure case.
+      ok = false;
+    }
+    break;
   case '/':
     token.type_ = tokenComment;
     ok = readComment();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jsoncpp-1.9.3/src/lib_json/json_writer.cpp 
new/jsoncpp-1.9.4/src/lib_json/json_writer.cpp
--- old/jsoncpp-1.9.3/src/lib_json/json_writer.cpp      2020-05-29 
15:50:26.000000000 +0200
+++ new/jsoncpp-1.9.4/src/lib_json/json_writer.cpp      2020-09-26 
04:19:16.000000000 +0200
@@ -175,11 +175,11 @@
 
 String valueToString(bool value) { return value ? "true" : "false"; }
 
-static bool isAnyCharRequiredQuoting(char const* s, size_t n) {
+static bool doesAnyCharRequireEscaping(char const* s, size_t n) {
   assert(s || !n);
 
   return std::any_of(s, s + n, [](unsigned char c) {
-    return c == '\\' || c == '"' || !std::isprint(c);
+    return c == '\\' || c == '"' || c < 0x20 || c > 0x7F;
   });
 }
 
@@ -275,7 +275,7 @@
   if (value == nullptr)
     return "";
 
-  if (!isAnyCharRequiredQuoting(value, length))
+  if (!doesAnyCharRequireEscaping(value, length))
     return String("\"") + value + "\"";
   // We have to walk value and escape any special characters.
   // Appending to String is not efficient, but this should be rare.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jsoncpp-1.9.3/src/test_lib_json/CMakeLists.txt 
new/jsoncpp-1.9.4/src/test_lib_json/CMakeLists.txt
--- old/jsoncpp-1.9.3/src/test_lib_json/CMakeLists.txt  2020-05-29 
15:50:26.000000000 +0200
+++ new/jsoncpp-1.9.4/src/test_lib_json/CMakeLists.txt  2020-09-26 
04:19:16.000000000 +0200
@@ -15,8 +15,10 @@
     else()
         add_definitions( -DJSON_DLL )
     endif()
+    target_link_libraries(jsoncpp_test jsoncpp_lib)
+else()
+    target_link_libraries(jsoncpp_test jsoncpp_static)
 endif()
-target_link_libraries(jsoncpp_test jsoncpp_lib)
 
 # another way to solve issue #90
 #set_target_properties(jsoncpp_test PROPERTIES COMPILE_FLAGS -ffloat-store)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jsoncpp-1.9.3/src/test_lib_json/main.cpp 
new/jsoncpp-1.9.4/src/test_lib_json/main.cpp
--- old/jsoncpp-1.9.3/src/test_lib_json/main.cpp        2020-05-29 
15:50:26.000000000 +0200
+++ new/jsoncpp-1.9.4/src/test_lib_json/main.cpp        2020-09-26 
04:19:16.000000000 +0200
@@ -2702,6 +2702,34 @@
   }
 }
 
+#ifdef _WIN32
+JSONTEST_FIXTURE_LOCAL(StreamWriterTest, escapeTabCharacterWindows) {
+  // Get the current locale before changing it
+  std::string currentLocale = setlocale(LC_ALL, NULL);
+  setlocale(LC_ALL, "English_United States.1252");
+
+  Json::Value root;
+  root["test"] = "\tTabTesting\t";
+
+  Json::StreamWriterBuilder b;
+
+  JSONTEST_ASSERT(Json::writeString(b, root) == "{\n\t\"test\" : "
+                                                "\"\\tTabTesting\\t\"\n}");
+
+  b.settings_["emitUTF8"] = true;
+  JSONTEST_ASSERT(Json::writeString(b, root) == "{\n\t\"test\" : "
+                                                "\"\\tTabTesting\\t\"\n}");
+
+  b.settings_["emitUTF8"] = false;
+  JSONTEST_ASSERT(Json::writeString(b, root) == "{\n\t\"test\" : "
+                                                "\"\\tTabTesting\\t\"\n}");
+
+  // Restore the locale
+  if (!currentLocale.empty())
+    setlocale(LC_ALL, currentLocale.c_str());
+}
+#endif
+
 struct ReaderTest : JsonTest::TestCase {
   void setStrictMode() {
     reader = std::unique_ptr<Json::Reader>(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jsoncpp-1.9.3/test/data/fail_invalid_quote.json 
new/jsoncpp-1.9.4/test/data/fail_invalid_quote.json
--- old/jsoncpp-1.9.3/test/data/fail_invalid_quote.json 1970-01-01 
01:00:00.000000000 +0100
+++ new/jsoncpp-1.9.4/test/data/fail_invalid_quote.json 2020-09-26 
04:19:16.000000000 +0200
@@ -0,0 +1 @@
+{'//this is bad JSON.'}
\ No newline at end of file


Reply via email to