Subject: CVS commit: pkgsrc/textproc/json-c
From: Adam Ciarcinski
Date: 2018-08-04 11:53:05
Message id: 20180804095305.B8F9CFBEC@cvs.NetBSD.org

Log Message:
json-c: updated to 0.13.1

0.13.1:
* Bump the major version of the .so library generated up to 4.0 to avoid
  conflicts because some downstream packagers of json-c had already done
  their own bump to ".so.3" for a much older 0.12 release.
* Add const size_t json_c_object_sizeof()
* Avoid invalid free (and thus a segfault) when ref_count gets < 0
* fix handling of custom double formats that include a ".0"
* Avoid uninitialized variable warnings in json_object_object_foreach
* Issue 396: fix build for certain uClibc based systems.
* Add a top level fuzz directory for fuzzers run by OSS-Fuzz

0.13:
This release, being three and a half years after the 0.12 branch (f84d9c),
   has quite a number of changes included.  The following is a sampling of
   the most significant ones.

Since the 0.12 release, 250 issues and pull requests have been closed.
See issues_closed_for_0.13.md for a complete list.

Deprecated and removed features:
--------------------------------
* All internal use of bits.h has been eliminated.  The file will be removed.
        Do not use: hexdigit(), error_ptr(), error_descrition() and it_error()
* lh_abort() is deprecated.  It will be removed.

Behavior changes:
-----------------
* Tighten the number parsing algorithm to raise errors instead of truncating
     the results.  For example 12.3.4 or 2015-01-15, which now return null.
         See commit 99d8fc

* Use size_t for array length and size.  Platforms where sizeof(size_t) != \ 
sizeof(int) may not be backwards compatible
        See commits 45c56b, 92e9a5 and others.

* Check for failue when allocating memory, returning NULL and errno=ENOMEM.
         See commit 2149a04.

* Change json_object_object_add() return type from void to int, and will return \ 
-1 on failures, instead of exiting. (Note: this is not an ABI change)

New features:
-------------
* We're aiming to follow RFC 7159 now.

* Add a couple of additional option to json_object_to_json_string_ext:
        JSON_C_TO_STRING_PRETTY_TAB
        JSON_C_TO_STRING_NOSLASHESCAPE

* Add a json_object_object_add_ex() function to allow for performance
        improvements when certain constraints are known to be true.

* Make serialization format of doubles configurable, in two different ways:
        Call json_object_set_serializer with json_object_double_to_json_string \ 
and a custom
         format on each double object, or
        Call json_c_set_serialization_double_format() to set a global or \ 
thread-wide format.

* Add utility function for comparing json_objects - json_object_equal()

* Add a way to copy entire object trees: json_object_deep_copy()
* Add json_object_set_<type> function to modify the value of existing \ 
json_object's
 without the need to recreate them.  Also add a json_object_int_inc function to
 adjust an int's value.
* Add support for JSON pointer, RFC 6901.  See json_pointer.h
* Add a json_util_get_last_err() function to retrieve the string describing the
 cause of errors, instead of printing to stderr.
* Add perllike hash function for strings, and json_global_set_string_hash() 8f8d03d
* Add a json_c_visit() function to provide a way to iterate over a tree of \ 
json-c objects.

Notable bug fixes and other improvements:
-----------------------------------------
* Make reference increment and decrement atomic to allow passing json objects \ 
between threads.
* Fix json_object_object_foreach to avoid uninitialized variable warnings.
* Improve performance by removing unneeded data items from hashtable code and \ 
reducing duplicate hash computation.
* Improve performance by storing small strings inside json_object
* Improve performance of json_object_to_json_string by removing variadic printf. \ 
commit 9ff0f49
* Issue 371: fix parsing of "-Infinity", and avoid needlessly copying \ 
the input when doing so.
* Fix stack buffer overflow in json_object_double_to_json_string_format() - \ 
commit 2c2deb87
* Fix various potential null ptr deref and int32 overflows
* Issue 332: fix a long-standing bug in array_list_put_idx() where it would \ 
attempt to free previously free'd entries due to not checking the current array \ 
length.
* Issue 195: use uselocale() instead of setlocale() in json_tokener to behave \ 
better in threaded environments.
* Issue 275: fix out of bounds read when handling unicode surrogate pairs.
* Ensure doubles that happen to be a whole number are emitted with \ 
".0" - commit ca7a19
* for Visual Studio, use a snprintf/vsnprintf wrapper that ensures the string is \ 
terminated.
* Fix double to int cast overflow in json_object_get_int64.
* Clamp double to int32 when narrowing in json_object_get_int.
* Use strtoll() to parse ints - instead of sscanf
* Miscellaneous smaller changes, including removing unused variables, fixing warning
 about uninitialized variables adding const qualifiers, reformatting code, etc...

Files:
RevisionActionfile
1.13modifypkgsrc/textproc/json-c/Makefile
1.5modifypkgsrc/textproc/json-c/PLIST
1.8modifypkgsrc/textproc/json-c/distinfo
1.1removepkgsrc/textproc/json-c/patches/patch-linkhash.c