b0b627
# HG changeset patch
b0b627
# User Rob Lemley <rob@thunderbird.net>
b0b627
# Date 1663090875 0
b0b627
#      Tue Sep 13 17:41:15 2022 +0000
b0b627
# Node ID adfbf6378df82c8b2e087427a48ddc5cbe13aadd
b0b627
# Parent  fbc2cf15893e40959b04d22c9efa4d424aeb5c4f
b0b627
Bug 1790662 - Update json-c vendored source to 0.16. r=dandarnell
b0b627
b0b627
Differential Revision: https://phabricator.services.mozilla.com/D157961
b0b627
b0b627
diff --git a/comm/third_party/README.json-c b/comm/third_party/README.json-c
b0b627
--- a/comm/third_party/README.json-c
b0b627
+++ b/comm/third_party/README.json-c
b0b627
@@ -1,19 +1,20 @@
b0b627
-Directory ./json-c contains a copy of version 0.15 of the json-c library,
b0b627
-which has been obtained from https://s3.amazonaws.com/json-c_releases/releases/json-c-0.15-nodoc.tar.gz .
b0b627
+Directory ./json-c contains a copy of version 0.16 of the json-c library,
b0b627
+which has been obtained from https://s3.amazonaws.com/json-c_releases/releases/json-c-0.16-nodoc.tar.gz .
b0b627
 (Link at https://github.com/json-c/json-c/wiki).
b0b627
 
b0b627
 For licensing information, please refer to the included documentation.
b0b627
 
b0b627
 The SHA256SUM of the imported file is:
b0b627
-99bca4f944b8ced8ae0bbc6310d6a3528ca715e69541793a1ef51f8c5b4b0878  json-c-0.15-nodoc.tar.gz
b0b627
+ac8a3dd6820daaca579b23fbc74664310fbc3d67f52f6707cda67d21dde5570f  json-c-0.16-nodoc.tar.gz
b0b627
 
b0b627
 The following files and directories were removed from the source distribution's root:
b0b627
 .github/
b0b627
 apps/
b0b627
 bench/
b0b627
 cmake/
b0b627
+doc/
b0b627
 fuzz/
b0b627
 tests/
b0b627
 .clang-format
b0b627
 .editorconfig
b0b627
 .gitignore
b0b627
@@ -21,10 +22,12 @@ tests/
b0b627
 Android.configure.mk
b0b627
 CMakeLists.txt
b0b627
 README
b0b627
 appveyor.yml
b0b627
 cmake-configure
b0b627
+issues_closed_for_0.{13,14,15,16}.md
b0b627
+json_config.h.win32
b0b627
 json-c.pc.in
b0b627
 json-c.sym
b0b627
 
b0b627
 The following files were added to the source's root by MZLA Technologies:
b0b627
 config.h.in (modified copy from cmake/config.h.in)
b0b627
diff --git a/comm/third_party/json-c/AUTHORS b/comm/third_party/json-c/AUTHORS
b0b627
--- a/comm/third_party/json-c/AUTHORS
b0b627
+++ b/comm/third_party/json-c/AUTHORS
b0b627
@@ -1,30 +1,61 @@
b0b627
+Alan Coopersmith <alan.coopersmith@oracle.com>
b0b627
 Alexander Dahl <post@lespocky.de>
b0b627
+Alexandru Ardelean <ardeleanalex@gmail.com>
b0b627
 andy5995 <andy400-dev@yahoo.com>
b0b627
+Aram Poghosyan <Aram.Poghosyan@teamviewer.com>
b0b627
 Björn Esser <besser82@fedoraproject.org>
b0b627
+BonsaY <bonsay@posteo.de>
b0b627
 changyong guo <guo1487@163.com>
b0b627
 chenguoping <chenguopingdota@163.com>
b0b627
+Chris Lamb <lamby@debian.org>
b0b627
 Christopher Head <chead@chead.ca>
b0b627
 Chris Wolfe <chriswwolfe@gmail.com>
b0b627
 C. Watford (christopher.watford@gmail.com)
b0b627
 Darjan Krijan <darjan_krijan@gmx.de>
b0b627
+David McCann <mccannd@uk.ibm.com>
b0b627
+DeX77 <dex@dragonslave.de>
b0b627
+dota17 <chenguopingdota@163.com>
b0b627
+Eric Haszlakiewicz <erh+git@nimenees.com>
b0b627
 Eric Hawicz <erh+git@nimenees.com>
b0b627
+Even Rouault <even.rouault@spatialys.com>
b0b627
+Gianluigi Tiesi <sherpya@netfarm.it>
b0b627
 grdowns <grdowns@microsoft.com>
b0b627
+Hex052 <elijahiff@gmail.com>
b0b627
+hofnarr <hofnarr@hofnarr.fi>
b0b627
+ihsinme <61293369+ihsinme@users.noreply.github.com>
b0b627
 Ivan Romanov <drizt@land.ru>
b0b627
 Jaap Keuter <jaap.keuter@xs4all.nl>
b0b627
+Jakov Smolic <jakov.smolic@sartura.hr>
b0b627
 janczer <menshikov.ivn@gmail.com>
b0b627
 Jehan <jehan@girinstud.io>
b0b627
 Jehiah Czebotar <jehiah@gmail.com>
b0b627
 Jonathan Wiens <j.wiens@teles.com>
b0b627
 Jose Bollo <jose.bollo@iot.bzh>
b0b627
+José Bollo <jose.bollo@iot.bzh>
b0b627
+Juuso Alasuutari <juuso.alasuutari@gmail.com>
b0b627
 Keith Holman <keith.holman@windriver.com>
b0b627
+Kizuna-Meraki <z9@kizunameraki.de>
b0b627
+Leon Gross <leon.gross@rub.de>
b0b627
 Liang, Gao <liang.gao@intel.com>
b0b627
+Marc <34656315+MarcT512@users.noreply.github.com>
b0b627
 max <mpano91@gmail.com>
b0b627
+Micah Snyder <micasnyd@cisco.com>
b0b627
 Michael Clark <michael@metaparadigm.com>
b0b627
 myd7349 <myd7349@gmail.com>
b0b627
+Pascal Cuoq <cuoq@trust-in-soft.com>
b0b627
+Pawday <pawday@mail.ru>
b0b627
+Philosoph228 <philosoph228@gmail.com>
b0b627
 Pierce Lopez <pierce.lopez@gmail.com>
b0b627
 Po-Chuan Hsieh <sunpoet@sunpoet.net>
b0b627
 Ramiro Polla <ramiro.polla@gmail.com>
b0b627
 Rikard Falkeborn <rikard.falkeborn@gmail.com>
b0b627
+Robert Bielik <robert.bielik@dirac.com>
b0b627
 Robert <roby_p97@yahoo.com>
b0b627
+Rosen Penev <rosenp@gmail.com>
b0b627
 Rubasri Kalidas <rubasri.kalidas@intel.com>
b0b627
+Simon McVittie <smcv@collabora.com>
b0b627
+ssrlive <30760636+ssrlive@users.noreply.github.com>
b0b627
+Tobias Nießen <tniessen@users.noreply.github.com>
b0b627
+Tobias Stoeckmann <tobias@stoeckmann.org>
b0b627
+Tudor Brindus <me@tbrindus.ca>
b0b627
 Unmanned Player <36690541+unmanned-player@users.noreply.github.com>
b0b627
diff --git a/comm/third_party/json-c/ChangeLog b/comm/third_party/json-c/ChangeLog
b0b627
--- a/comm/third_party/json-c/ChangeLog
b0b627
+++ b/comm/third_party/json-c/ChangeLog
b0b627
@@ -1,8 +1,62 @@
b0b627
 
b0b627
-Next Release 0.15
b0b627
-=====================
b0b627
+0.16 (up to commit 66dcdf5, 2022-04-13)
b0b627
+========================================
b0b627
+
b0b627
+Deprecated and removed features:
b0b627
+--------------------------------
b0b627
+* JSON_C_OBJECT_KEY_IS_CONSTANT is deprecated in favor of
b0b627
+  JSON_C_OBJECT_ADD_CONSTANT_KEY
b0b627
+* Direct access to lh_table and lh_entry structure members is deprecated.  
b0b627
+  Use access functions instead, lh_table_head(), lh_entry_next(), etc...
b0b627
+* Drop REFCOUNT_DEBUG code.
b0b627
+
b0b627
+New features
b0b627
+------------
b0b627
+* The 0.16 release introduces no new features
b0b627
+
b0b627
+Build changes
b0b627
+-------------
b0b627
+* Add a DISABLE_EXTRA_LIBS option to skip using libbsd
b0b627
+* Add a DISABLE_JSON_POINTER option to skip compiling in json_pointer support.
b0b627
+
b0b627
+Significant changes and bug fixes
b0b627
+---------------------------------
b0b627
+* Cap string length at INT_MAX to avoid various issues with very long strings.
b0b627
+* json_object_deep_copy: fix deep copy of strings containing '\0'
b0b627
+* Fix read past end of buffer in the "json_parse" command
b0b627
+* Avoid out of memory accesses in the locally provided vasprintf() function
b0b627
+  (for those platforms that use it)
b0b627
+* Handle allocation failure in json_tokener_new_ex
b0b627
+* Fix use-after-free in json_tokener_new_ex() in the event of printbuf_new() returning NULL
b0b627
+* printbuf_memset(): set gaps to zero - areas within the print buffer which
b0b627
+  have not been initialized by using printbuf_memset
b0b627
+* printbuf: return -1 on invalid arguments (len < 0 or total buffer > INT_MAX)
b0b627
+* sprintbuf(): propagate printbuf_memappend errors back to the caller
b0b627
+
b0b627
+Optimizations
b0b627
+--------------
b0b627
+* Speed up parsing by replacing ctype functions with simplified, faster 
b0b627
+  non-locale-sensitive ones in json_tokener and json_object_to_json_string.
b0b627
+* Neither vertical tab nor formfeed are considered whitespace per the JSON spec
b0b627
+* json_object: speed up creation of objects, calloc() -> malloc() + set fields
b0b627
+* Avoid needless extra strlen() call in json_c_shallow_copy_default() and
b0b627
+  json_object_equal() when the object is known to be a json_type_string.
b0b627
+
b0b627
+Other changes
b0b627
+-------------
b0b627
+* Validate size arguments in arraylist functions.
b0b627
+* Use getrandom() if available; with GRND_NONBLOCK to allow use of json-c
b0b627
+  very early during boot, such as part of cryptsetup.
b0b627
+* Use arc4random() if it's available.
b0b627
+* random_seed: on error, continue to next method instead of exiting the process
b0b627
+* Close file when unable to read from /dev/urandom in get_dev_random_seed()
b0b627
+
b0b627
+***
b0b627
+
b0b627
+0.15 (up to commit 870965e, 2020/07/26)
b0b627
+========================================
b0b627
 
b0b627
 Deprecated and removed features:
b0b627
 --------------------------------
b0b627
 * Deprecate `array_list_new()` in favor of `array_list_new2()`
b0b627
 * Remove the THIS_FUNCTION_IS_DEPRECATED define.
b0b627
@@ -57,11 +111,11 @@ Significant changes and bug fixes
b0b627
 Other changes
b0b627
 -------------
b0b627
 * #589 - Detect broken RDRAND during initialization; also, fix segfault
b0b627
     in the CPUID check.
b0b627
 * #592 - Fix integer overflows to prevert out of bounds write on large input.
b0b627
-* Protect against division by zero in linkhash, when creaed with zero size.
b0b627
+* Protect against division by zero in linkhash, when created with zero size.
b0b627
 * #602 - Fix json_parse_uint64() internal error checking, leaving the retval
b0b627
     untouched in more failure cases.
b0b627
 * #614 - Prevent truncation when custom double formatters insert extra \0's
b0b627
 
b0b627
 
b0b627
@@ -183,11 +237,11 @@ Behavior changes:
b0b627
 	 See commit 99d8fc
b0b627
 
b0b627
 * Use size_t for array length and size.  Platforms where sizeof(size_t) != sizeof(int) may not be backwards compatible
b0b627
 	See commits 45c56b, 92e9a5 and others.
b0b627
 
b0b627
-* Check for failue when allocating memory, returning NULL and errno=ENOMEM.
b0b627
+* Check for failure when allocating memory, returning NULL and errno=ENOMEM.
b0b627
 	 See commit 2149a04.
b0b627
 
b0b627
 * 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)
b0b627
 
b0b627
 New features:
b0b627
@@ -374,11 +428,11 @@ 0.10
b0b627
   * Add json_object_object_get_ex(), a NULL-safe get object method, to be able
b0b627
      to distinguish between a key not present and the value being NULL.
b0b627
   * Add an alternative iterator implementation, see json_object_iterator.h
b0b627
   * Make json_object_iter public to enable external use of the
b0b627
      json_object_object_foreachC macro.
b0b627
-  * Add a printbuf_memset() function to provide an effecient way to set and
b0b627
+  * Add a printbuf_memset() function to provide an efficient way to set and
b0b627
      append things like whitespace indentation.
b0b627
   * Adjust json_object_is_type and json_object_get_type so they return
b0b627
       json_type_null for NULL objects and handle NULL passed to
b0b627
       json_objct_object_get().
b0b627
   * Rename boolean type to json_bool.
b0b627
@@ -460,11 +514,11 @@ 0.8
b0b627
     Geoffrey Young, geoff at modperlcookbook dot org
b0b627
 
b0b627
 0.7
b0b627
 ===
b0b627
   * Add escaping of backslash to json output
b0b627
-  * Add escaping of foward slash on tokenizing and output
b0b627
+  * Add escaping of forward slash on tokenizing and output
b0b627
   * Changes to internal tokenizer from using recursion to
b0b627
     using a depth state structure to allow incremental parsing
b0b627
 
b0b627
 0.6
b0b627
 ===
b0b627
diff --git a/comm/third_party/json-c/README.html b/comm/third_party/json-c/README.html
b0b627
--- a/comm/third_party/json-c/README.html
b0b627
+++ b/comm/third_party/json-c/README.html
b0b627
@@ -24,16 +24,16 @@
b0b627
 		
  • msbuild "json-c.vcxproj" /m /verbosity:normal /p:OutDir=lib\
  • b0b627
     		
  • Or, open the project in Visual Studio
  • b0b627
     		
    b0b627
     
    b0b627
     		

    Documentation

    b0b627
    -		

    Doxygen generated documentation exists here.

    b0b627
    +		

    Doxygen generated documentation exists here.

    b0b627
     
    b0b627
     		

    GIT Reposository

    b0b627
     		

    git clone https://github.com/json-c/json-c.git

    b0b627
     
    b0b627
    -		

    Mailing List

    b0b627
    +		

    Mailing List

    b0b627
                     <pi>Send email to json-c <at> googlegroups <dot> com

    b0b627
     
    b0b627
     		

    License

    b0b627
     		

    This program is free software; you can redistribute it and/or modify it under the terms of the MIT License.

    b0b627
     		
    b0b627
    diff --git a/comm/third_party/json-c/README.md b/comm/third_party/json-c/README.md
    b0b627
    --- a/comm/third_party/json-c/README.md
    b0b627
    +++ b/comm/third_party/json-c/README.md
    b0b627
    @@ -14,32 +14,39 @@ 6. [Linking to libjson-c](#linking)
    b0b627
     7. [Using json-c](#using)
    b0b627
     
    b0b627
     JSON-C - A JSON implementation in C 
    b0b627
     -----------------------------------
    b0b627
     
    b0b627
    +JSON-C implements a reference counting object model that allows you to easily
    b0b627
    +construct JSON objects in C, output them as JSON formatted strings and parse
    b0b627
    +JSON formatted strings back into the C representation of JSON objects.
    b0b627
    +It aims to conform to [RFC 7159](https://tools.ietf.org/html/rfc7159).
    b0b627
    +
    b0b627
    +Skip down to [Using json-c](#using)
    b0b627
    +or check out the [API docs](https://json-c.github.io/json-c/),
    b0b627
    +if you already have json-c installed and ready to use.
    b0b627
    +
    b0b627
    +Home page for json-c: https://github.com/json-c/json-c/wiki
    b0b627
    +
    b0b627
     Build Status
    b0b627
     * [AppVeyor Build](https://ci.appveyor.com/project/hawicz/json-c) ![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/json-c/json-c?branch=master&svg=true)
    b0b627
     * [Travis Build](https://travis-ci.org/json-c/json-c) ![Travis Build Status](https://travis-ci.org/json-c/json-c.svg?branch=master)
    b0b627
     
    b0b627
     Test Status
    b0b627
     * [Coveralls](https://coveralls.io/github/json-c/json-c?branch=master) [![Coverage Status](https://coveralls.io/repos/github/json-c/json-c/badge.svg?branch=master)](https://coveralls.io/github/json-c/json-c?branch=master)
    b0b627
     
    b0b627
    -JSON-C implements a reference counting object model that allows you to easily
    b0b627
    -construct JSON objects in C, output them as JSON formatted strings and parse
    b0b627
    -JSON formatted strings back into the C representation of JSON objects.
    b0b627
    -It aims to conform to [RFC 7159](https://tools.ietf.org/html/rfc7159).
    b0b627
    -
    b0b627
     Building on Unix with `git`, `gcc` and `cmake` 
    b0b627
     --------------------------------------------------
    b0b627
     
    b0b627
    -Home page for json-c: https://github.com/json-c/json-c/wiki
    b0b627
    +If you already have json-c installed, see [Linking to `libjson-c`](#linking)
    b0b627
    +for how to build and link your program against it.
    b0b627
     
    b0b627
     ### Prerequisites: 
    b0b627
     
    b0b627
      - `gcc`, `clang`, or another C compiler
    b0b627
     
    b0b627
    - - cmake>=2.8, >=3.16 recommended
    b0b627
    + - `cmake>=2.8`, `>=3.16` recommended, `cmake=>3.1` for tests
    b0b627
     
    b0b627
     To generate docs you'll also need:
    b0b627
      - `doxygen>=1.8.13`
    b0b627
     
    b0b627
     If you are on a relatively modern system, you'll likely be able to install
    b0b627
    @@ -78,11 +85,11 @@ Then:
    b0b627
     ```
    b0b627
     
    b0b627
     
    b0b627
     ### Generating documentation with Doxygen:
    b0b627
     
    b0b627
    -The libray documentation can be generated directly from the source codes using Doxygen tool:
    b0b627
    +The library documentation can be generated directly from the source code using Doxygen tool:
    b0b627
     
    b0b627
     ```sh
    b0b627
     # in build directory
    b0b627
     make doc
    b0b627
     google-chrome doc/html/index.html
    b0b627
    @@ -184,11 +191,11 @@ make USE_VALGRIND=0 test   # optionally 
    b0b627
     
    b0b627
     If a test fails, check `Testing/Temporary/LastTest.log`,
    b0b627
     `tests/testSubDir/${testname}/${testname}.vg.out`, and other similar files.
    b0b627
     If there is insufficient output try:
    b0b627
     ```sh
    b0b627
    -VERBOSE=1 make test
    b0b627
    +VERBOSE=1 CTEST_OUTPUT_ON_FAILURE=1 make test
    b0b627
     ```
    b0b627
     or
    b0b627
     ```sh
    b0b627
     JSONC_TEST_TRACE=1 make test
    b0b627
     ```
    b0b627
    @@ -218,42 +225,59 @@ then you can just add this to your `make
    b0b627
     ```make
    b0b627
     CFLAGS += $(shell pkg-config --cflags json-c)
    b0b627
     LDFLAGS += $(shell pkg-config --libs json-c)
    b0b627
     ```
    b0b627
     
    b0b627
    -Without `pkgconfig`, you would do something like this:
    b0b627
    +Without `pkgconfig`, you might do something like this:
    b0b627
     
    b0b627
     ```make
    b0b627
     JSON_C_DIR=/path/to/json_c/install
    b0b627
     CFLAGS += -I$(JSON_C_DIR)/include/json-c
    b0b627
    +# Or to use lines like: #include <json-c/json_object.h>
    b0b627
    +#CFLAGS += -I$(JSON_C_DIR)/include
    b0b627
     LDFLAGS+= -L$(JSON_C_DIR)/lib -ljson-c
    b0b627
     ```
    b0b627
     
    b0b627
    +If your project uses cmake:
    b0b627
    +
    b0b627
    +* Add to your CMakeLists.txt file:
    b0b627
    +
    b0b627
    +```cmake
    b0b627
    +find_package(json-c CONFIG)
    b0b627
    +target_link_libraries(${PROJECT_NAME} PRIVATE json-c::json-c)
    b0b627
    +```
    b0b627
    +
    b0b627
    +* Then you might run in your project:
    b0b627
    +
    b0b627
    +```sh
    b0b627
    +cd build
    b0b627
    +cmake -DCMAKE_PREFIX_PATH=/path/to/json_c/install/lib64/cmake ..
    b0b627
    +```
    b0b627
     
    b0b627
     Using json-c 
    b0b627
     ------------
    b0b627
     
    b0b627
    -To use json-c you can either include json.h, or preferrably, one of the
    b0b627
    +To use json-c you can either include json.h, or preferably, one of the
    b0b627
     following more specific header files:
    b0b627
     
    b0b627
     * json_object.h  - Core types and methods.
    b0b627
     * json_tokener.h - Methods for parsing and serializing json-c object trees.
    b0b627
     * json_pointer.h - JSON Pointer (RFC 6901) implementation for retrieving
    b0b627
                        objects from a json-c object tree.
    b0b627
     * json_object_iterator.h - Methods for iterating over single json_object instances.  (See also `json_object_object_foreach()` in json_object.h)
    b0b627
     * json_visit.h   - Methods for walking a tree of json-c objects.
    b0b627
    -* json_util.h    - Miscelleanous utility functions.
    b0b627
    +* json_util.h    - Miscellaneous utility functions.
    b0b627
     
    b0b627
    -For a full list of headers see [files.html](http://json-c.github.io/json-c/json-c-current-release/doc/html/files.html)
    b0b627
    +For a full list of headers see [files.html](https://json-c.github.io/json-c/json-c-current-release/doc/html/files.html)
    b0b627
     
    b0b627
     The primary type in json-c is json_object.  It describes a reference counted
    b0b627
     tree of json objects which are created by either parsing text with a
    b0b627
     json_tokener (i.e. `json_tokener_parse_ex()`), or by creating
    b0b627
     (with `json_object_new_object()`, `json_object_new_int()`, etc...) and adding
    b0b627
     (with `json_object_object_add()`, `json_object_array_add()`, etc...) them 
    b0b627
     individually.
    b0b627
    -Typically, every object in the tree will have one reference, from it's parent.
    b0b627
    +Typically, every object in the tree will have one reference, from its parent.
    b0b627
     When you are done with the tree of objects, you call json_object_put() on just
    b0b627
     the root object to free it, which recurses down through any child objects
    b0b627
     calling json_object_put() on each one of those in turn.
    b0b627
     
    b0b627
     You can get a reference to a single child 
    b0b627
    @@ -264,11 +288,11 @@ increment the child's refcount (`json_ob
    b0b627
     the parent being freed or it being removed from its parent
    b0b627
     (`json_object_object_del()` or `json_object_array_del_idx()`)
    b0b627
     
    b0b627
     When parsing text, the json_tokener object is independent from the json_object
    b0b627
     that it returns.  It can be allocated (`json_tokener_new()`)
    b0b627
    -used ones or multiple times (`json_tokener_parse_ex()`, and
    b0b627
    +used one or multiple times (`json_tokener_parse_ex()`, and
    b0b627
     freed (`json_tokener_free()`) while the json_object objects live on.
    b0b627
     
    b0b627
     A json_object tree can be serialized back into a string with 
    b0b627
     `json_object_to_json_string_ext()`.  The string that is returned 
    b0b627
     is only valid until the next "to_json_string" call on that same object.
    b0b627
    diff --git a/comm/third_party/json-c/RELEASE_CHECKLIST.txt b/comm/third_party/json-c/RELEASE_CHECKLIST.txt
    b0b627
    --- a/comm/third_party/json-c/RELEASE_CHECKLIST.txt
    b0b627
    +++ b/comm/third_party/json-c/RELEASE_CHECKLIST.txt
    b0b627
    @@ -18,11 +18,18 @@
    b0b627
             * https://github.com/lvc/abi-compliance-checker
    b0b627
             * If the new release is not backwards compatible, then this is a MAJOR release.
    b0b627
             * Mention removed features in ChangeLog
    b0b627
     		* Consider re-adding backwards compatible support, through symbol
    b0b627
     		  aliases and appropriate entries in json-c.sym
    b0b627
    +		* Be sure any new symbols are listed in json-c.sym as part of
    b0b627
    +		  the _new_ release version.
    b0b627
         * Update the AUTHORS file
    b0b627
    +
    b0b627
    +        PREV=$(git tag | tail -1)
    b0b627
    +        ( git log -r ${PREV}..HEAD | grep Author: | sed -e's/Author: //' ; cat AUTHORS ) | sort -u > A1
    b0b627
    +        mv A1 AUTHORS
    b0b627
    +
    b0b627
         * Exclude mentioning changes that have already been included in a point 
    b0b627
           release of the previous release branch.
    b0b627
     
    b0b627
     * Update ChangeLog with relevant notes before branching.
    b0b627
     
    b0b627
    @@ -31,18 +38,18 @@
    b0b627
     * Check that the compile works on Windows - automatic through AppVeyor
    b0b627
     
    b0b627
     ## Release creation
    b0b627
     
    b0b627
     Start creating the new release:
    b0b627
    -    release=0.15
    b0b627
    +    release=0.16
    b0b627
         git clone https://github.com/json-c/json-c json-c-${release}
    b0b627
     
    b0b627
         mkdir distcheck
    b0b627
         cd distcheck
    b0b627
         # Note, the build directory *must* be entirely separate from
    b0b627
         # the source tree for distcheck to work properly.
    b0b627
    -    cmake ../json-c-${release}
    b0b627
    +    cmake -DCMAKE_BUILD_TYPE=Release ../json-c-${release}
    b0b627
         make distcheck
    b0b627
         cd ..
    b0b627
     
    b0b627
     Make any fixes/changes *before* branching.
    b0b627
     
    b0b627
    @@ -53,11 +60,10 @@ Make any fixes/changes *before* branchin
    b0b627
     ------------
    b0b627
     
    b0b627
     Using ${release}:
    b0b627
     	Update the version in json_c_version.h
    b0b627
     	Update the version in CMakeLists.txt (VERSION in the project(...) line)
    b0b627
    -	Update the version in config.h.win32 (several places)
    b0b627
     
    b0b627
     Update the set_target_properties() line in CmakeLists.txt to set the shared
    b0b627
     library version.  Generally, unless we're doing a major release, change:
    b0b627
     	VERSION x.y.z
    b0b627
     to
    b0b627
    @@ -72,23 +78,25 @@ If we're doing a major release (SONAME b
    b0b627
     
    b0b627
     ------------
    b0b627
     
    b0b627
     Generate the doxygen documentation:
    b0b627
     
    b0b627
    -    doxygen
    b0b627
    +    (cd ../distcheck && make doc)
    b0b627
    +    cp -r -p ../distcheck/doc/{html,Doxyfile} doc/.
    b0b627
    +	rm doc/Doxyfile   # Remove generated file w/ hardcoded paths
    b0b627
         git add -f doc
    b0b627
    -    git commit doc
    b0b627
    +    git commit doc -m "Generate docs for the ${release} release"
    b0b627
     
    b0b627
     ------------
    b0b627
     
    b0b627
     Create the release tarballs:
    b0b627
     
    b0b627
         cd ..
    b0b627
         echo .git > excludes
    b0b627
         tar -czf json-c-${release}.tar.gz -X excludes json-c-${release}
    b0b627
     
    b0b627
    -    echo doc >> excludes
    b0b627
    +    echo 'doc/*' >> excludes
    b0b627
         tar -czf json-c-${release}-nodoc.tar.gz -X excludes json-c-${release}
    b0b627
     
    b0b627
     ------------
    b0b627
     
    b0b627
     Tag the branch:
    b0b627
    @@ -102,11 +110,11 @@ Tag the branch:
    b0b627
     ------------
    b0b627
     
    b0b627
     Go to Amazon S3 service at:
    b0b627
         https://console.aws.amazon.com/s3/
    b0b627
     
    b0b627
    -Upload the two tarballs in the json-c_releases folder.
    b0b627
    +Upload the two tarballs in the json-c_releases/releases folder.
    b0b627
     	When uploading, use "Standard" storage class, and make the uploaded files publicly accessible.
    b0b627
     
    b0b627
     Logout of Amazon S3, and verify that the files are visible.
    b0b627
         https://s3.amazonaws.com/json-c_releases/releases/index.html
    b0b627
     
    b0b627
    @@ -119,17 +127,18 @@ Post-release checklist:
    b0b627
     Add new section to ChangeLog for ${release}+1
    b0b627
     
    b0b627
     Use ${release}.99 to indicate a version "newer" than anything on the branch:
    b0b627
     	Update the version in json_c_version.h
    b0b627
     	Update the version in CMakeLists.txt
    b0b627
    -	Update the version in config.h.win32
    b0b627
     
    b0b627
     Update RELEASE_CHECKLIST.txt, set release=${release}+1
    b0b627
     
    b0b627
    +Add a new empty section to the json-c.sym file, for ${release}+1
    b0b627
    +
    b0b627
     Update the set_target_properties() line in CmakeLists.txt to match the release branch.
    b0b627
     
    b0b627
    -    git commit -a -m "Update the master branch to version 0.${release}.99"
    b0b627
    +    git commit -a -m "Update the master branch to version ${release}.99"
    b0b627
         git push
    b0b627
     
    b0b627
     ------------
    b0b627
     
    b0b627
     Update the gh-pages branch with new docs:
    b0b627
    @@ -141,10 +150,12 @@ Update the gh-pages branch with new docs
    b0b627
         git clone -b gh-pages https://github.com/json-c/json-c json-c-pages
    b0b627
         cd json-c-pages
    b0b627
         mkdir json-c-${release}
    b0b627
         cp -R ../json-c-${release}/doc json-c-${release}/.
    b0b627
         git add json-c-${release}
    b0b627
    +    rm json-c-current-release
    b0b627
    +    ln -s json-c-${release} json-c-current-release
    b0b627
         git commit -a -m "Add the ${release} docs."
    b0b627
     
    b0b627
         vi index.html
    b0b627
         # Add/change links to current release.
    b0b627
     
    b0b627
    diff --git a/comm/third_party/json-c/arraylist.c b/comm/third_party/json-c/arraylist.c
    b0b627
    --- a/comm/third_party/json-c/arraylist.c
    b0b627
    +++ b/comm/third_party/json-c/arraylist.c
    b0b627
    @@ -43,10 +43,12 @@ struct array_list *array_list_new(array_
    b0b627
     
    b0b627
     struct array_list *array_list_new2(array_list_free_fn *free_fn, int initial_size)
    b0b627
     {
    b0b627
     	struct array_list *arr;
    b0b627
     
    b0b627
    +	if (initial_size < 0 || (size_t)initial_size >= SIZE_T_MAX / sizeof(void *))
    b0b627
    +		return NULL;
    b0b627
     	arr = (struct array_list *)malloc(sizeof(struct array_list));
    b0b627
     	if (!arr)
    b0b627
     		return NULL;
    b0b627
     	arr->size = initial_size;
    b0b627
     	arr->length = 0;
    b0b627
    @@ -104,10 +106,12 @@ static int array_list_expand_internal(st
    b0b627
     int array_list_shrink(struct array_list *arr, size_t empty_slots)
    b0b627
     {
    b0b627
     	void *t;
    b0b627
     	size_t new_size;
    b0b627
     
    b0b627
    +	if (empty_slots >= SIZE_T_MAX / sizeof(void *) - arr->length)
    b0b627
    +		return -1;
    b0b627
     	new_size = arr->length + empty_slots;
    b0b627
     	if (new_size == arr->size)
    b0b627
     		return 0;
    b0b627
     	if (new_size > arr->size)
    b0b627
     		return array_list_expand_internal(arr, new_size);
    b0b627
    diff --git a/comm/third_party/json-c/arraylist.h b/comm/third_party/json-c/arraylist.h
    b0b627
    --- a/comm/third_party/json-c/arraylist.h
    b0b627
    +++ b/comm/third_party/json-c/arraylist.h
    b0b627
    @@ -13,12 +13,12 @@
    b0b627
      * @file
    b0b627
      * @brief Internal methods for working with json_type_array objects.
    b0b627
      *        Although this is exposed by the json_object_get_array() method,
    b0b627
      *        it is not recommended for direct use.
    b0b627
      */
    b0b627
    -#ifndef _arraylist_h_
    b0b627
    -#define _arraylist_h_
    b0b627
    +#ifndef _json_c_arraylist_h_
    b0b627
    +#define _json_c_arraylist_h_
    b0b627
     
    b0b627
     #ifdef __cplusplus
    b0b627
     extern "C" {
    b0b627
     #endif
    b0b627
     
    b0b627
    diff --git a/comm/third_party/json-c/config.h.in b/comm/third_party/json-c/config.h.in
    b0b627
    --- a/comm/third_party/json-c/config.h.in
    b0b627
    +++ b/comm/third_party/json-c/config.h.in
    b0b627
    @@ -55,10 +55,13 @@
    b0b627
     #undef HAVE_SYS_CDEFS_H
    b0b627
     
    b0b627
     /* Define to 1 if you have the <sys/param.h> header file. */
    b0b627
     #undef HAVE_SYS_PARAM_H
    b0b627
     
    b0b627
    +/* Define to 1 if you have the <sys/random.h> header file. */
    b0b627
    +#undef HAVE_SYS_RANDOM_H
    b0b627
    +
    b0b627
     /* Define to 1 if you have the <sys/resource.h> header file. */
    b0b627
     #undef HAVE_SYS_RESOURCE_H
    b0b627
     
    b0b627
     /* Define to 1 if you have the <sys/stat.h> header file. */
    b0b627
     #undef HAVE_SYS_STAT_H
    b0b627
    @@ -70,10 +73,16 @@
    b0b627
     #undef HAVE_UNISTD_H
    b0b627
     
    b0b627
     /* Define to 1 if you have the <xlocale.h> header file. */
    b0b627
     #undef HAVE_XLOCALE_H
    b0b627
     
    b0b627
    +/* Define to 1 if you have the <bsd/stdlib.h> header file. */
    b0b627
    +#undef HAVE_BSD_STDLIB_H
    b0b627
    +
    b0b627
    +/* Define to 1 if you have `arc4random' */
    b0b627
    +#undef HAVE_ARC4RANDOM
    b0b627
    +
    b0b627
     /* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
    b0b627
     #undef HAVE_DOPRNT
    b0b627
     
    b0b627
     /* Has atomic builtins */
    b0b627
     #undef HAVE_ATOMIC_BUILTINS
    b0b627
    @@ -139,10 +148,13 @@
    b0b627
     #undef HAVE_VSNPRINTF
    b0b627
     
    b0b627
     /* Define to 1 if you have the `vsyslog' function. */
    b0b627
     #undef HAVE_VSYSLOG
    b0b627
     
    b0b627
    +/* Define if you have the `getrandom' function. */
    b0b627
    +#undef HAVE_GETRANDOM
    b0b627
    +
    b0b627
     /* Define if you have the `getrusage' function. */
    b0b627
     #undef HAVE_GETRUSAGE
    b0b627
     
    b0b627
     /* Have __thread */
    b0b627
     #undef HAVE___THREAD
    b0b627
    diff --git a/comm/third_party/json-c/debug.h b/third_party/json-c/deb/commug.h
    b0b627
    --- a/comm/third_party/json-c/debug.h
    b0b627
    +++ b/comm/third_party/json-c/debug.h
    b0b627
    @@ -12,21 +12,21 @@
    b0b627
     
    b0b627
     /**
    b0b627
      * @file
    b0b627
      * @brief Do not use, json-c internal, may be changed or removed at any time.
    b0b627
      */
    b0b627
    -#ifndef _DEBUG_H_
    b0b627
    -#define _DEBUG_H_
    b0b627
    +#ifndef _JSON_C_DEBUG_H_
    b0b627
    +#define _JSON_C_DEBUG_H_
    b0b627
     
    b0b627
     #include <stdlib.h>
    b0b627
     
    b0b627
     #ifdef __cplusplus
    b0b627
     extern "C" {
    b0b627
     #endif
    b0b627
     
    b0b627
     #ifndef JSON_EXPORT
    b0b627
    -#if defined(_MSC_VER)
    b0b627
    +#if defined(_MSC_VER) && defined(JSON_C_DLL)
    b0b627
     #define JSON_EXPORT __declspec(dllexport)
    b0b627
     #else
    b0b627
     #define JSON_EXPORT extern
    b0b627
     #endif
    b0b627
     #endif
    b0b627
    diff --git a/comm/third_party/json-c/issues_closed_for_0.13.md b/comm/third_party/json-c/issues_closed_for_0.13.md
    b0b627
    deleted file mode 100644
    b0b627
    --- a/comm/third_party/json-c/issues_closed_for_0.13.md
    b0b627
    +++ /dev/null
    b0b627
    @@ -1,270 +0,0 @@
    b0b627
    -
    b0b627
    -This list was created with:
    b0b627
    -
    b0b627
    -```
    b0b627
    -curl https://api.github.com/search/issues?q="repo%3Ajson-c%2Fjson-c+closed%3A>2014-04-10+created%3A<2017-12-01&sort=created&order=asc&per_page=400&page=1" > issues1.out
    b0b627
    -curl https://api.github.com/search/issues?q="repo%3Ajson-c%2Fjson-c+closed%3A>2014-04-10+created%3A<2017-12-01&sort=created&order=asc&per_page=400&page=2" > issues2.out
    b0b627
    -curl https://api.github.com/search/issues?q="repo%3Ajson-c%2Fjson-c+closed%3A>2014-04-10+created%3A<2017-12-01&sort=created&order=asc&per_page=400&page=3" > issues3.out
    b0b627
    -jq -r '.items[] | "[" + .title + "](" + .url + ")" | tostring' issues?.out  > issues.md
    b0b627
    -sed -e's,^\[ *\(.*\)\](https://api.github.com/.*/\([0-9].*\)),[Issue #\2](https://github.com/json-c/json-c/issues/\2) - \1,' -i issues.md
    b0b627
    -#... manual editing ...
    b0b627
    -```
    b0b627
    -
    b0b627
    -----
    b0b627
    -
    b0b627
    -Issues and Pull Requests closed for the 0.13 release
    b0b627
    -(since commit f84d9c, the 0.12 branch point, 2014-04-10)
    b0b627
    -
    b0b627
    -
    b0b627
    -* [Issue #61](https://github.com/json-c/json-c/issues/61) - Make json_object_object_add() indicate success or failure, test fix \
    b0b627
    -* [Issue #113](https://github.com/json-c/json-c/issues/113) - Build fixes (make dist and make distcheck) \
    b0b627
    -* [Issue #124](https://github.com/json-c/json-c/issues/124) - Fixing build \
    b0b627
    -* [Issue #125](https://github.com/json-c/json-c/issues/125) - Fix compile error(variable size set but not used) on g++4.6 \
    b0b627
    -* [Issue #126](https://github.com/json-c/json-c/issues/126) - Removed unused size variable. \
    b0b627
    -* [Issue #127](https://github.com/json-c/json-c/issues/127) - remove unused `size` variable \
    b0b627
    -* [Issue #128](https://github.com/json-c/json-c/issues/128) - Remove unused variable from json_tokenizer.c \
    b0b627
    -* [Issue #130](https://github.com/json-c/json-c/issues/130) - Failed to compile under Ubuntu 13.10 32bit \
    b0b627
    -* [Issue #131](https://github.com/json-c/json-c/issues/131) - undefined symbol: __sync_val_compare_and_swap_4 \
    b0b627
    -* [Issue #132](https://github.com/json-c/json-c/issues/132) - Remove unused variable 'size' \
    b0b627
    -* [Issue #133](https://github.com/json-c/json-c/issues/133) - Update and rename README to README.md \
    b0b627
    -* [Issue #134](https://github.com/json-c/json-c/issues/134) - Must remove variable size... \
    b0b627
    -* [Issue #135](https://github.com/json-c/json-c/issues/135) - bits.h uses removed json_tokener_errors\[error\] \
    b0b627
    -* [Issue #136](https://github.com/json-c/json-c/issues/136) - Error when running make check \
    b0b627
    -* [Issue #137](https://github.com/json-c/json-c/issues/137) - config.h.in should not be in git \
    b0b627
    -* [Issue #138](https://github.com/json-c/json-c/issues/138) - Can't build on RHEL 6.5 due to dependency on automake-1.14 \
    b0b627
    -* [Issue #140](https://github.com/json-c/json-c/issues/140) - Code bug in random_test.c evaluating same expression twice \
    b0b627
    -* [Issue #141](https://github.com/json-c/json-c/issues/141) - Removed duplicate check in random_seed test - bug #140 \
    b0b627
    -* [Issue #142](https://github.com/json-c/json-c/issues/142) - Please undeprecate json_object_object_get \
    b0b627
    -* [Issue #144](https://github.com/json-c/json-c/issues/144) - Introduce json_object_from_fd \
    b0b627
    -* [Issue #145](https://github.com/json-c/json-c/issues/145) - Handle % character properly \
    b0b627
    -* [Issue #146](https://github.com/json-c/json-c/issues/146) - TAGS rename \
    b0b627
    -* [Issue #148](https://github.com/json-c/json-c/issues/148) - Bump the soname \
    b0b627
    -* [Issue #149](https://github.com/json-c/json-c/issues/149) - SONAME bump \
    b0b627
    -* [Issue #150](https://github.com/json-c/json-c/issues/150) - Fix build using MinGW. \
    b0b627
    -* [Issue #151](https://github.com/json-c/json-c/issues/151) - Remove json_type enum trailing comma \
    b0b627
    -* [Issue #152](https://github.com/json-c/json-c/issues/152) - error while compiling json-c library version 0.11 \
    b0b627
    -* [Issue #153](https://github.com/json-c/json-c/issues/153) - improve doc for json_object_to_json_string() \
    b0b627
    -* [Issue #154](https://github.com/json-c/json-c/issues/154) - double precision \
    b0b627
    -* [Issue #155](https://github.com/json-c/json-c/issues/155) - add bsearch for arrays \
    b0b627
    -* [Issue #156](https://github.com/json-c/json-c/issues/156) - Remove trailing whitespaces \
    b0b627
    -* [Issue #157](https://github.com/json-c/json-c/issues/157) - JSON-C shall not exit on calloc fail. \
    b0b627
    -* [Issue #158](https://github.com/json-c/json-c/issues/158) - while using json-c 0.11, I am facing strange crash issue in json_object_put. \
    b0b627
    -* [Issue #159](https://github.com/json-c/json-c/issues/159) - json_tokener.c compile error \
    b0b627
    -* [Issue #160](https://github.com/json-c/json-c/issues/160) - missing header file on windows?? \
    b0b627
    -* [Issue #161](https://github.com/json-c/json-c/issues/161) - Is there a way to append to file? \
    b0b627
    -* [Issue #162](https://github.com/json-c/json-c/issues/162) - json_util: add directory check for POSIX distros \
    b0b627
    -* [Issue #163](https://github.com/json-c/json-c/issues/163) - Fix Win32 build problems \
    b0b627
    -* [Issue #164](https://github.com/json-c/json-c/issues/164) - made it compile and link on Widnows (as static library) \
    b0b627
    -* [Issue #165](https://github.com/json-c/json-c/issues/165) - json_object_to_json_string_ext length \
    b0b627
    -* [Issue #167](https://github.com/json-c/json-c/issues/167) - Can't build on Windows with Visual Studio 2010 \
    b0b627
    -* [Issue #168](https://github.com/json-c/json-c/issues/168) - Tightening the number parsing algorithm \
    b0b627
    -* [Issue #169](https://github.com/json-c/json-c/issues/169) - Doesn't compile on ubuntu 14.04, 64bit \
    b0b627
    -* [Issue #170](https://github.com/json-c/json-c/issues/170) - Generated files in repository \
    b0b627
    -* [Issue #171](https://github.com/json-c/json-c/issues/171) - Update configuration for VS2010 and win64 \
    b0b627
    -* [Issue #172](https://github.com/json-c/json-c/issues/172) - Adding support for parsing octal numbers \
    b0b627
    -* [Issue #173](https://github.com/json-c/json-c/issues/173) - json_parse_int64 doesn't work correctly at illumos \
    b0b627
    -* [Issue #174](https://github.com/json-c/json-c/issues/174) - Adding JSON_C_TO_STRING_PRETTY_TAB flag \
    b0b627
    -* [Issue #175](https://github.com/json-c/json-c/issues/175) - make check fails 4 tests with overflows when built with ASAN \
    b0b627
    -* [Issue #176](https://github.com/json-c/json-c/issues/176) - Possible to delete an array element at a given idx ? \
    b0b627
    -* [Issue #177](https://github.com/json-c/json-c/issues/177) - Fix compiler warnings \
    b0b627
    -* [Issue #178](https://github.com/json-c/json-c/issues/178) - Unable to compile on CentOS5 \
    b0b627
    -* [Issue #179](https://github.com/json-c/json-c/issues/179) - Added array_list_del_idx and json_object_array_del_idx \
    b0b627
    -* [Issue #180](https://github.com/json-c/json-c/issues/180) - Enable silent build by default \
    b0b627
    -* [Issue #181](https://github.com/json-c/json-c/issues/181) - json_tokener_parse_ex accepts invalid JSON \
    b0b627
    -* [Issue #182](https://github.com/json-c/json-c/issues/182) - Link against libm when needed \
    b0b627
    -* [Issue #183](https://github.com/json-c/json-c/issues/183) - Apply compile warning fix to master branch \
    b0b627
    -* [Issue #184](https://github.com/json-c/json-c/issues/184) - Use only GCC-specific flags when compiling with GCC \
    b0b627
    -* [Issue #185](https://github.com/json-c/json-c/issues/185) - compile error \
    b0b627
    -* [Issue #186](https://github.com/json-c/json-c/issues/186) - Syntax error \
    b0b627
    -* [Issue #187](https://github.com/json-c/json-c/issues/187) - array_list_get_idx and negative indexes. \
    b0b627
    -* [Issue #188](https://github.com/json-c/json-c/issues/188) - json_object_object_foreach warnings \
    b0b627
    -* [Issue #189](https://github.com/json-c/json-c/issues/189) - noisy json_object_from_file: error opening file \
    b0b627
    -* [Issue #190](https://github.com/json-c/json-c/issues/190) - warning: initialization discards const qualifier from pointer target type \[enabled by default\] \
    b0b627
    -* [Issue #192](https://github.com/json-c/json-c/issues/192) - json_tokener_parse  accepts invalid JSON {"key": "value" ,  } \
    b0b627
    -* [Issue #193](https://github.com/json-c/json-c/issues/193) - Make serialization format of doubles configurable \
    b0b627
    -* [Issue #194](https://github.com/json-c/json-c/issues/194) - Add utility function for comparing json_objects \
    b0b627
    -* [Issue #195](https://github.com/json-c/json-c/issues/195) - Call uselocale instead of setlocale \
    b0b627
    -* [Issue #196](https://github.com/json-c/json-c/issues/196) - Performance improvements \
    b0b627
    -* [Issue #197](https://github.com/json-c/json-c/issues/197) - Time for a new release? \
    b0b627
    -* [Issue #198](https://github.com/json-c/json-c/issues/198) - Fix possible memory leak and remove superfluous NULL checks before free() \
    b0b627
    -* [Issue #199](https://github.com/json-c/json-c/issues/199) - Fix build in Visual Studio \
    b0b627
    -* [Issue #200](https://github.com/json-c/json-c/issues/200) - Add build scripts for CI platforms \
    b0b627
    -* [Issue #201](https://github.com/json-c/json-c/issues/201) - disable forward-slash escaping? \
    b0b627
    -* [Issue #202](https://github.com/json-c/json-c/issues/202) - Array with objects support \
    b0b627
    -* [Issue #203](https://github.com/json-c/json-c/issues/203) - Add source position/coordinates to API \
    b0b627
    -* [Issue #204](https://github.com/json-c/json-c/issues/204) - json-c/json.h not found \
    b0b627
    -* [Issue #205](https://github.com/json-c/json-c/issues/205) - json-c Compiled with Visual Studios \
    b0b627
    -* [Issue #206](https://github.com/json-c/json-c/issues/206) - what do i use in place of json_object_object_get? \
    b0b627
    -* [Issue #207](https://github.com/json-c/json-c/issues/207) - Add support for property pairs directly added to arrays \
    b0b627
    -* [Issue #208](https://github.com/json-c/json-c/issues/208) - Performance enhancements (mainly) to json_object_to_json_string() \
    b0b627
    -* [Issue #209](https://github.com/json-c/json-c/issues/209) - fix regression from 2d549662be832da838aa063da2efa78ee3b99668 \
    b0b627
    -* [Issue #210](https://github.com/json-c/json-c/issues/210) - Use size_t for arrays \
    b0b627
    -* [Issue #211](https://github.com/json-c/json-c/issues/211) - Atomic updates for the refcount \
    b0b627
    -* [Issue #212](https://github.com/json-c/json-c/issues/212) - Refcount doesn't work between threads \
    b0b627
    -* [Issue #213](https://github.com/json-c/json-c/issues/213) - fix to compile with microsoft visual c++ 2010 \
    b0b627
    -* [Issue #214](https://github.com/json-c/json-c/issues/214) - Some non-GNU systems support __sync_val_compare_and_swap \
    b0b627
    -* [Issue #215](https://github.com/json-c/json-c/issues/215) - Build json-c for window 64 bit. \
    b0b627
    -* [Issue #216](https://github.com/json-c/json-c/issues/216) - configure: check realloc with AC_CHECK_FUNCS() to fix cross-compilation. \
    b0b627
    -* [Issue #217](https://github.com/json-c/json-c/issues/217) - Checking for functions in float.h \
    b0b627
    -* [Issue #218](https://github.com/json-c/json-c/issues/218) - Use a macro to indicate C99 to the compiler \
    b0b627
    -* [Issue #219](https://github.com/json-c/json-c/issues/219) - Fix various potential null ptr deref and int32 overflows \
    b0b627
    -* [Issue #220](https://github.com/json-c/json-c/issues/220) - Add utility function for comparing json_objects \
    b0b627
    -* [Issue #221](https://github.com/json-c/json-c/issues/221) - JSON_C_TO_STRING_NOSLASHESCAPE works incorrectly \
    b0b627
    -* [Issue #222](https://github.com/json-c/json-c/issues/222) - Fix issue #221: JSON_C_TO_STRING_NOSLASHESCAPE works incorrectly \
    b0b627
    -* [Issue #223](https://github.com/json-c/json-c/issues/223) - Clarify json_object_get_string documentation of NULL handling & return \
    b0b627
    -* [Issue #224](https://github.com/json-c/json-c/issues/224) - json_tokener.c - all warnings being treated as errors \
    b0b627
    -* [Issue #225](https://github.com/json-c/json-c/issues/225) - Hi, will you support clib as a "registry"? \
    b0b627
    -* [Issue #227](https://github.com/json-c/json-c/issues/227) - Bump SOVERSION to 3 \
    b0b627
    -* [Issue #228](https://github.com/json-c/json-c/issues/228) - avoid double slashes from json \
    b0b627
    -* [Issue #229](https://github.com/json-c/json-c/issues/229) - configure fails: checking size of size_t... configure: error: cannot determine a size for size_t \
    b0b627
    -* [Issue #230](https://github.com/json-c/json-c/issues/230) - Use stdint.h to check for size_t size \
    b0b627
    -* [Issue #231](https://github.com/json-c/json-c/issues/231) - Fix size_t size check for first-time builds \
    b0b627
    -* [Issue #232](https://github.com/json-c/json-c/issues/232) - tests/tests1: fix printf format for size_t arguments \
    b0b627
    -* [Issue #233](https://github.com/json-c/json-c/issues/233) - Include stddef.h in json_object.h \
    b0b627
    -* [Issue #234](https://github.com/json-c/json-c/issues/234) - Add public API to use userdata independently of custom serializer \
    b0b627
    -* [Issue #235](https://github.com/json-c/json-c/issues/235) - Undefined symbols Error for architecture x86_64 on Mac \
    b0b627
    -* [Issue #236](https://github.com/json-c/json-c/issues/236) - Building a project which uses json-c with flag -Wcast-qual causes compilation errors \
    b0b627
    -* [Issue #237](https://github.com/json-c/json-c/issues/237) - handle escaped utf-8 \
    b0b627
    -* [Issue #238](https://github.com/json-c/json-c/issues/238) - linkhash.c: optimised the table_free path \
    b0b627
    -* [Issue #239](https://github.com/json-c/json-c/issues/239) - initialize null terminator of new printbuf \
    b0b627
    -* [Issue #240](https://github.com/json-c/json-c/issues/240) - Compile error: Variable set but not used \
    b0b627
    -* [Issue #241](https://github.com/json-c/json-c/issues/241) - getting error in date string 19\/07\/2016, fixed for error 19/07/2016 \
    b0b627
    -* [Issue #242](https://github.com/json-c/json-c/issues/242) - json_tokener_parse error \
    b0b627
    -* [Issue #243](https://github.com/json-c/json-c/issues/243) - Fix #165 \
    b0b627
    -* [Issue #244](https://github.com/json-c/json-c/issues/244) - Error while compiling source from RHEL5, could you please help me to fix this \
    b0b627
    -* [Issue #245](https://github.com/json-c/json-c/issues/245) - json-c compile in window xp \
    b0b627
    -* [Issue #246](https://github.com/json-c/json-c/issues/246) - Mac: uselocale failed to build \
    b0b627
    -* [Issue #247](https://github.com/json-c/json-c/issues/247) - json_object_array_del_idx function has segment fault error? \
    b0b627
    -* [Issue #248](https://github.com/json-c/json-c/issues/248) - Minor changes in C source code \
    b0b627
    -* [Issue #249](https://github.com/json-c/json-c/issues/249) - Improving README \
    b0b627
    -* [Issue #250](https://github.com/json-c/json-c/issues/250) - Improving .gitignore \
    b0b627
    -* [Issue #251](https://github.com/json-c/json-c/issues/251) - Adding a file for EditorConfig \
    b0b627
    -* [Issue #252](https://github.com/json-c/json-c/issues/252) - Very minor changes not related to C source code \
    b0b627
    -* [Issue #253](https://github.com/json-c/json-c/issues/253) - Adding a test with cppcheck for Travis CI \
    b0b627
    -* [Issue #254](https://github.com/json-c/json-c/issues/254) - Very minor changes to some tests \
    b0b627
    -* [Issue #255](https://github.com/json-c/json-c/issues/255) - Minor changes in C source code \
    b0b627
    -* [Issue #256](https://github.com/json-c/json-c/issues/256) - Mailing list dead? \
    b0b627
    -* [Issue #257](https://github.com/json-c/json-c/issues/257) - Defining a coding style \
    b0b627
    -* [Issue #258](https://github.com/json-c/json-c/issues/258) - Enable CI services \
    b0b627
    -* [Issue #259](https://github.com/json-c/json-c/issues/259) - Fails to parse valid json \
    b0b627
    -* [Issue #260](https://github.com/json-c/json-c/issues/260) - Adding an object to itself \
    b0b627
    -* [Issue #261](https://github.com/json-c/json-c/issues/261) - Lack of proper documentation \
    b0b627
    -* [Issue #262](https://github.com/json-c/json-c/issues/262) - Add Cmakefile and fix compiler warning. \
    b0b627
    -* [Issue #263](https://github.com/json-c/json-c/issues/263) - Compiler Warnings with VS2015 \
    b0b627
    -* [Issue #264](https://github.com/json-c/json-c/issues/264) - successed in simple test   while failed in my project \
    b0b627
    -* [Issue #265](https://github.com/json-c/json-c/issues/265) - Conformance report for reference \
    b0b627
    -* [Issue #266](https://github.com/json-c/json-c/issues/266) - crash perhaps related to reference counting \
    b0b627
    -* [Issue #267](https://github.com/json-c/json-c/issues/267) - Removes me as Win32 maintainer, because I'm not. \
    b0b627
    -* [Issue #268](https://github.com/json-c/json-c/issues/268) - Documentation of json_object_to_json_string gives no information about memory management \
    b0b627
    -* [Issue #269](https://github.com/json-c/json-c/issues/269) - json_object_<type>_set(json_object *o,<type> value) API for value setting in json object private structure \
    b0b627
    -* [Issue #270](https://github.com/json-c/json-c/issues/270) - new API json_object_new_double_f(doubel d,const char * fmt); \
    b0b627
    -* [Issue #271](https://github.com/json-c/json-c/issues/271) - Cannot compile using CMake on macOS \
    b0b627
    -* [Issue #273](https://github.com/json-c/json-c/issues/273) - fixed wrong object name in json_object_all_values_equal \
    b0b627
    -* [Issue #274](https://github.com/json-c/json-c/issues/274) - Support for 64 bit pointers on Windows \
    b0b627
    -* [Issue #275](https://github.com/json-c/json-c/issues/275) - Out-of-bounds read in json_tokener_parse_ex \
    b0b627
    -* [Issue #276](https://github.com/json-c/json-c/issues/276) - ./configure for centos release 6.7(final) failure \
    b0b627
    -* [Issue #277](https://github.com/json-c/json-c/issues/277) - Json object set xxx \
    b0b627
    -* [Issue #278](https://github.com/json-c/json-c/issues/278) - Serialization of double with no fractional component drops trailing zero \
    b0b627
    -* [Issue #279](https://github.com/json-c/json-c/issues/279) - Segmentation fault in array_list_length() \
    b0b627
    -* [Issue #280](https://github.com/json-c/json-c/issues/280) - Should json_object_array_get_idx  check whether input obj is array? \
    b0b627
    -* [Issue #281](https://github.com/json-c/json-c/issues/281) - how to pretty print json-c? \
    b0b627
    -* [Issue #282](https://github.com/json-c/json-c/issues/282) - ignore temporary files \
    b0b627
    -* [Issue #283](https://github.com/json-c/json-c/issues/283) - json_pointer: add first revision based on RFC 6901 \
    b0b627
    -* [Issue #284](https://github.com/json-c/json-c/issues/284) - Resusing  json_tokener object \
    b0b627
    -* [Issue #285](https://github.com/json-c/json-c/issues/285) - Revert "compat/strdup.h: move common compat check for strdup() to own \
    b0b627
    -* [Issue #286](https://github.com/json-c/json-c/issues/286) - json_tokener_parse_ex() returns json_tokener_continue on zero-length string \
    b0b627
    -* [Issue #287](https://github.com/json-c/json-c/issues/287) - json_pointer: extend setter & getter with printf() style arguments \
    b0b627
    -* [Issue #288](https://github.com/json-c/json-c/issues/288) - Fix _GNU_SOURCE define for vasprintf \
    b0b627
    -* [Issue #289](https://github.com/json-c/json-c/issues/289) - bugfix: floating point representaion without fractional part \
    b0b627
    -* [Issue #290](https://github.com/json-c/json-c/issues/290) - duplicate an json_object \
    b0b627
    -* [Issue #291](https://github.com/json-c/json-c/issues/291) - isspace assert error \
    b0b627
    -* [Issue #292](https://github.com/json-c/json-c/issues/292) - configure error  "./configure: line 13121: syntax error near unexpected token `-Wall'" \
    b0b627
    -* [Issue #293](https://github.com/json-c/json-c/issues/293) - how to make with bitcode for ios \
    b0b627
    -* [Issue #294](https://github.com/json-c/json-c/issues/294) - Adding UTF-8 validation.  Fixes #122 \
    b0b627
    -* [Issue #295](https://github.com/json-c/json-c/issues/295) - cross compile w/ mingw \
    b0b627
    -* [Issue #296](https://github.com/json-c/json-c/issues/296) - Missing functions header in json_object.h \
    b0b627
    -* [Issue #297](https://github.com/json-c/json-c/issues/297) - could not parse string to Json object? Like string str=\"helloworld;E\\test\\log\\;end\" \
    b0b627
    -* [Issue #298](https://github.com/json-c/json-c/issues/298) - Building using CMake doesn't work \
    b0b627
    -* [Issue #299](https://github.com/json-c/json-c/issues/299) - Improve json_object -> string performance \
    b0b627
    -* [Issue #300](https://github.com/json-c/json-c/issues/300) - Running tests with MinGW build \
    b0b627
    -* [Issue #301](https://github.com/json-c/json-c/issues/301) - How to deep copy  json_object in C++ ? \
    b0b627
    -* [Issue #302](https://github.com/json-c/json-c/issues/302) - json_tokener_parse_ex doesn't parse JSON values \
    b0b627
    -* [Issue #303](https://github.com/json-c/json-c/issues/303) - fix doc in tokener header file \
    b0b627
    -* [Issue #304](https://github.com/json-c/json-c/issues/304) - (.text+0x72846): undefined reference to `is_error' \
    b0b627
    -* [Issue #305](https://github.com/json-c/json-c/issues/305) - Fix compilation without C-99 option \
    b0b627
    -* [Issue #306](https://github.com/json-c/json-c/issues/306) - ./configure: line 12748 -error=deprecated-declarations \
    b0b627
    -* [Issue #307](https://github.com/json-c/json-c/issues/307) - Memory leak in json_tokener_parse \
    b0b627
    -* [Issue #308](https://github.com/json-c/json-c/issues/308) - AM_PROG_LIBTOOL not found on Linux \
    b0b627
    -* [Issue #309](https://github.com/json-c/json-c/issues/309) - GCC 7 reports various -Wimplicit-fallthrough= errors \
    b0b627
    -* [Issue #310](https://github.com/json-c/json-c/issues/310) - Add FALLTHRU comment to handle GCC7 warnings. \
    b0b627
    -* [Issue #311](https://github.com/json-c/json-c/issues/311) - Fix error C3688 when compiling on Visual Studio 2015 \
    b0b627
    -* [Issue #312](https://github.com/json-c/json-c/issues/312) - Fix CMake Build process improved for MinGW and MSYS2 \
    b0b627
    -* [Issue #313](https://github.com/json-c/json-c/issues/313) - VERBOSE=1 make check; tests/test_util_file.test.c and tests/test_util_file.expected out of sync \
    b0b627
    -* [Issue #315](https://github.com/json-c/json-c/issues/315) - Passing -1 to json_tokener_parse_ex is possibly unsafe \
    b0b627
    -* [Issue #316](https://github.com/json-c/json-c/issues/316) - Memory Returned by json_object_to_json_string not freed \
    b0b627
    -* [Issue #317](https://github.com/json-c/json-c/issues/317) - json_object_get_string gives segmentation error \
    b0b627
    -* [Issue #318](https://github.com/json-c/json-c/issues/318) - PVS-Studio static analyzer analyze results \
    b0b627
    -* [Issue #319](https://github.com/json-c/json-c/issues/319) - Windows: Fix dynamic library build with Visual Studio \
    b0b627
    -* [Issue #320](https://github.com/json-c/json-c/issues/320) - Can't compile in Mac OS X El Capitan \
    b0b627
    -* [Issue #321](https://github.com/json-c/json-c/issues/321) - build,cmake: fix vasprintf implicit definition and generate both static & shared libs \
    b0b627
    -* [Issue #322](https://github.com/json-c/json-c/issues/322) - can not link with libjson-c.a \
    b0b627
    -* [Issue #323](https://github.com/json-c/json-c/issues/323) - implicit fallthrough detected by gcc 7.1 \
    b0b627
    -* [Issue #324](https://github.com/json-c/json-c/issues/324) - JsonPath like function? \
    b0b627
    -* [Issue #325](https://github.com/json-c/json-c/issues/325) - Fix stack buffer overflow in json_object_double_to_json_string_format() \
    b0b627
    -* [Issue #327](https://github.com/json-c/json-c/issues/327) - why json-c so hard to compile \
    b0b627
    -* [Issue #328](https://github.com/json-c/json-c/issues/328) - json_object: implement json_object_deep_copy() function \
    b0b627
    -* [Issue #329](https://github.com/json-c/json-c/issues/329) - build,cmake: build,cmake: rename libjson-c-static.a to libjson-c.a \
    b0b627
    -* [Issue #330](https://github.com/json-c/json-c/issues/330) - tests: symlink basic tests to a single file that has the common code \
    b0b627
    -* [Issue #331](https://github.com/json-c/json-c/issues/331) - Safe use of snprintf() / vsnprintf() for Visual studio, and thread-safety fix \
    b0b627
    -* [Issue #332](https://github.com/json-c/json-c/issues/332) - Valgrind: invalid read after json_object_array_del_idx. \
    b0b627
    -* [Issue #333](https://github.com/json-c/json-c/issues/333) - Replace obsolete AM_PROG_LIBTOOL \
    b0b627
    -* [Issue #335](https://github.com/json-c/json-c/issues/335) - README.md: show build status tag from travis-ci.org \
    b0b627
    -* [Issue #336](https://github.com/json-c/json-c/issues/336) - tests: fix tests in travis-ci.org \
    b0b627
    -* [Issue #337](https://github.com/json-c/json-c/issues/337) - Synchronize "potentially racy" random seed in lh_char_hash() \
    b0b627
    -* [Issue #338](https://github.com/json-c/json-c/issues/338) - implement json_object_int_inc(json_object *, int64_t) \
    b0b627
    -* [Issue #339](https://github.com/json-c/json-c/issues/339) - Json schema validation \
    b0b627
    -* [Issue #340](https://github.com/json-c/json-c/issues/340) - strerror_override: add extern "C" and JSON_EXPORT specifiers for Visual C++ compilers \
    b0b627
    -* [Issue #341](https://github.com/json-c/json-c/issues/341) - character "/" parse as "\/" \
    b0b627
    -* [Issue #342](https://github.com/json-c/json-c/issues/342) - No such file or directory "/usr/include/json.h" \
    b0b627
    -* [Issue #343](https://github.com/json-c/json-c/issues/343) - Can't parse json \
    b0b627
    -* [Issue #344](https://github.com/json-c/json-c/issues/344) - Fix Mingw build \
    b0b627
    -* [Issue #345](https://github.com/json-c/json-c/issues/345) - Fix make dist and make distcheck \
    b0b627
    -* [Issue #346](https://github.com/json-c/json-c/issues/346) - Clamp double to int32 when narrowing in json_object_get_int. \
    b0b627
    -* [Issue #347](https://github.com/json-c/json-c/issues/347) - MSVC linker error json_c_strerror \
    b0b627
    -* [Issue #348](https://github.com/json-c/json-c/issues/348) - why \
    b0b627
    -* [Issue #349](https://github.com/json-c/json-c/issues/349) - `missing` is missing? \
    b0b627
    -* [Issue #350](https://github.com/json-c/json-c/issues/350) - stderror-override and disable-shared \
    b0b627
    -* [Issue #351](https://github.com/json-c/json-c/issues/351) - SIZE_T_MAX redefined from limits.h \
    b0b627
    -* [Issue #352](https://github.com/json-c/json-c/issues/352) - `INSTALL` overrides an automake script. \
    b0b627
    -* [Issue #353](https://github.com/json-c/json-c/issues/353) - Documentation issues \
    b0b627
    -* [Issue #354](https://github.com/json-c/json-c/issues/354) - Fixes #351 #352 #353 \
    b0b627
    -* [Issue #355](https://github.com/json-c/json-c/issues/355) - 1.make it can been compiled with Visual Studio 2010 by modify the CMakeList.txt and others \
    b0b627
    -* [Issue #356](https://github.com/json-c/json-c/issues/356) - VS2008 test  test_util_file.cpp err! \
    b0b627
    -* [Issue #357](https://github.com/json-c/json-c/issues/357) - __json_c_strerror incompatibility with link-time optimization \
    b0b627
    -* [Issue #358](https://github.com/json-c/json-c/issues/358) - make issue \
    b0b627
    -* [Issue #359](https://github.com/json-c/json-c/issues/359) - update CMakeLists.txt for compile with visual studio at least 2010 \
    b0b627
    -* [Issue #360](https://github.com/json-c/json-c/issues/360) - Use strtoll() to parse ints \
    b0b627
    -* [Issue #361](https://github.com/json-c/json-c/issues/361) - Fix double to int cast overflow in json_object_get_int64. \
    b0b627
    -* [Issue #362](https://github.com/json-c/json-c/issues/362) - CMake Package Config \
    b0b627
    -* [Issue #363](https://github.com/json-c/json-c/issues/363) - Issue #338, add json_object_add_int functions \
    b0b627
    -* [Issue #364](https://github.com/json-c/json-c/issues/364) - Cmake is Errir \
    b0b627
    -* [Issue #365](https://github.com/json-c/json-c/issues/365) - added fallthrough for gcc7 \
    b0b627
    -* [Issue #366](https://github.com/json-c/json-c/issues/366) - how to check  the json string,crash! \
    b0b627
    -* [Issue #367](https://github.com/json-c/json-c/issues/367) - Is json-c support "redirect" semantic? \
    b0b627
    -* [Issue #368](https://github.com/json-c/json-c/issues/368) - Add examples \
    b0b627
    -* [Issue #369](https://github.com/json-c/json-c/issues/369) - How to build json-c library for android? \
    b0b627
    -* [Issue #370](https://github.com/json-c/json-c/issues/370) - Compiling using clang-cl \
    b0b627
    -* [Issue #371](https://github.com/json-c/json-c/issues/371) - Invalid parsing for Infinity with json-c 0.12 \
    b0b627
    -* [Issue #372](https://github.com/json-c/json-c/issues/372) - Json-c 0.12: Fixed Infinity bug \
    b0b627
    -* [Issue #373](https://github.com/json-c/json-c/issues/373) - build: fix build on appveyor CI \
    b0b627
    -* [Issue #374](https://github.com/json-c/json-c/issues/374) - Undefined symbols for architecture x86_64: \
    b0b627
    -* [Issue #375](https://github.com/json-c/json-c/issues/375) - what would happened when json_object_object_add add the same key \
    b0b627
    -* [Issue #376](https://github.com/json-c/json-c/issues/376) - Eclipse error \
    b0b627
    -* [Issue #377](https://github.com/json-c/json-c/issues/377) - on gcc 7.2.0 on my linux distribution with json-c  2013-04-02 source \
    b0b627
    -* [Issue #378](https://github.com/json-c/json-c/issues/378) - Eclipse: library (libjson-c) not found, but configured \
    b0b627
    -* [Issue #379](https://github.com/json-c/json-c/issues/379) - error: this statement may fall through \[-Werror=implicit-fallthrough=\] \
    b0b627
    -* [Issue #380](https://github.com/json-c/json-c/issues/380) - Build on Windows \
    b0b627
    -* [Issue #381](https://github.com/json-c/json-c/issues/381) - Fix makedist \
    b0b627
    -* [Issue #382](https://github.com/json-c/json-c/issues/382) - Memory leak for json_tokener_parse_ex for version 0.12.1 \
    b0b627
    -* [Issue #383](https://github.com/json-c/json-c/issues/383) - Fix a compiler warning. \
    b0b627
    -* [Issue #384](https://github.com/json-c/json-c/issues/384) - Fix a VS 2015 compiler warnings. \
    b0b627
    diff --git a/comm/third_party/json-c/issues_closed_for_0.14.md b/comm/third_party/json-c/issues_closed_for_0.14.md
    b0b627
    deleted file mode 100644
    b0b627
    --- a/comm/third_party/json-c/issues_closed_for_0.14.md
    b0b627
    +++ /dev/null
    b0b627
    @@ -1,202 +0,0 @@
    b0b627
    -This list was created with:
    b0b627
    -
    b0b627
    -```
    b0b627
    -curl https://api.github.com/search/issues?q="repo%3Ajson-c%2Fjson-c+closed%3A>2017-12-07+created%3A<2020-04-17&sort=created&order=asc&per_page=400&page=1" > issues1.out
    b0b627
    -curl https://api.github.com/search/issues?q="repo%3Ajson-c%2Fjson-c+closed%3A>2017-12-07+created%3A<2020-04-17&sort=created&order=asc&per_page=400&page=2" > issues2.out
    b0b627
    -curl https://api.github.com/search/issues?q="repo%3Ajson-c%2Fjson-c+closed%3A>2017-12-07+created%3A<2020-04-17&sort=created&order=asc&per_page=400&page=3" > issues3.out
    b0b627
    -jq -r '.items[] | "[" + .title + "](" + .url + ")" | tostring' issues?.out > issues.md
    b0b627
    -sed -e's,^\[ *\(.*\)\](https://api.github.com/.*/\([0-9].*\)),[Issue #\2](https://github.com/json-c/json-c/issues/\2) - \1,' -i issues.md
    b0b627
    -#... manual editing ...
    b0b627
    -```
    b0b627
    -
    b0b627
    -----
    b0b627
    -
    b0b627
    -Issues and Pull Requests closed for the 0.14 release (since commit d582d3a(2017-12-07) to a911439(2020-04-17))
    b0b627
    -
    b0b627
    -
    b0b627
    -* [Issue #122](https://github.com/json-c/json-c/issues/122) - Add utf-8 validation when parsing strings. \
    b0b627
    -* [Issue #139](https://github.com/json-c/json-c/issues/139) - json_object_from_file cannot accept max_depth \
    b0b627
    -* [Issue #143](https://github.com/json-c/json-c/issues/143) - RFE / enhancement for full 64-bit signed/unsigned support \
    b0b627
    -* [Issue #147](https://github.com/json-c/json-c/issues/147) - Please introduce soname bump if API changed \
    b0b627
    -* [Issue #166](https://github.com/json-c/json-c/issues/166) - Need a way to specify nesting depth when opening JSON file \
    b0b627
    -* [Issue #226](https://github.com/json-c/json-c/issues/226) - There is no json_object_new_null() \
    b0b627
    -* [Issue #314](https://github.com/json-c/json-c/issues/314) - new release ? \
    b0b627
    -* [Issue #326](https://github.com/json-c/json-c/issues/326) - Please extend api json_object_get_uint64 \
    b0b627
    -* [Issue #334](https://github.com/json-c/json-c/issues/334) - Switch json-c builds to use CMake \
    b0b627
    -* [Issue #386](https://github.com/json-c/json-c/issues/386) - Makefile: Add ACLOCAL_AMFLAGS \
    b0b627
    -* [Issue #387](https://github.com/json-c/json-c/issues/387) - doc: Use other doxygen feature to specify mainpage \
    b0b627
    -* [Issue #388](https://github.com/json-c/json-c/issues/388) - json_object: Add size_t json_object_sizeof() \
    b0b627
    -* [Issue #389](https://github.com/json-c/json-c/issues/389) - json_object: Avoid double free (and thus a segfault) when ref_count gets < 0 \
    b0b627
    -* [Issue #390](https://github.com/json-c/json-c/issues/390) - json_object: Add const size_t json_c_object_sizeof() \
    b0b627
    -* [Issue #391](https://github.com/json-c/json-c/issues/391) - Fix non-GNUC define for JSON_C_CONST_FUNCTION \
    b0b627
    -* [Issue #392](https://github.com/json-c/json-c/issues/392) - json_object: Avoid invalid free (and thus a segfault) when ref_count gets < 0 \
    b0b627
    -* [Issue #393](https://github.com/json-c/json-c/issues/393) - json_object_private: Use unsigned 32-bit integer type for refcount \
    b0b627
    -* [Issue #394](https://github.com/json-c/json-c/issues/394) - Problem serializing double \
    b0b627
    -* [Issue #395](https://github.com/json-c/json-c/issues/395) - Key gets modified if it contains "\" \
    b0b627
    -* [Issue #396](https://github.com/json-c/json-c/issues/396) - Build failure with no threads uClibc toolchain \
    b0b627
    -* [Issue #397](https://github.com/json-c/json-c/issues/397) - update json object with key. \
    b0b627
    -* [Issue #398](https://github.com/json-c/json-c/issues/398) - Build failed. \
    b0b627
    -* [Issue #399](https://github.com/json-c/json-c/issues/399) - Avoid uninitialized variable warnings \
    b0b627
    -* [Issue #400](https://github.com/json-c/json-c/issues/400) - How to generate static lib (.a) \
    b0b627
    -* [Issue #401](https://github.com/json-c/json-c/issues/401) - Warnings with Valgrind \
    b0b627
    -* [Issue #402](https://github.com/json-c/json-c/issues/402) - Add fuzzers from OSS-Fuzz \
    b0b627
    -* [Issue #403](https://github.com/json-c/json-c/issues/403) - Segmentation fault when double quotes is used \
    b0b627
    -* [Issue #404](https://github.com/json-c/json-c/issues/404) - valgrind: memory leak \
    b0b627
    -* [Issue #405](https://github.com/json-c/json-c/issues/405) - Missing API to determine an object is empty \
    b0b627
    -* [Issue #406](https://github.com/json-c/json-c/issues/406) - Undefine NDEBUG for tests \
    b0b627
    -* [Issue #407](https://github.com/json-c/json-c/issues/407) - json_tokener_parse is crash \
    b0b627
    -* [Issue #408](https://github.com/json-c/json-c/issues/408) - bug in array_list_del_idx when array_list_length()==1 \
    b0b627
    -* [Issue #410](https://github.com/json-c/json-c/issues/410) - Fixed typos \
    b0b627
    -* [Issue #411](https://github.com/json-c/json-c/issues/411) - Crash- signal SIGSEGV, Segmentation fault. ../sysdeps/x86_64/strlen.S: No such file or directory. \
    b0b627
    -* [Issue #412](https://github.com/json-c/json-c/issues/412) - json_type changes during inter process communication. \
    b0b627
    -* [Issue #413](https://github.com/json-c/json-c/issues/413) - how to read object of type `json_object *` in c++ \
    b0b627
    -* [Issue #414](https://github.com/json-c/json-c/issues/414) - [Question] How JSON-c stores the serialized data in memory? \
    b0b627
    -* [Issue #415](https://github.com/json-c/json-c/issues/415) - Resolve windows name conflict \
    b0b627
    -* [Issue #416](https://github.com/json-c/json-c/issues/416) - segmentation fault  in json_tokener_parse \
    b0b627
    -* [Issue #417](https://github.com/json-c/json-c/issues/417) - json_tokener_parse  json_object_object_get_ex with string value which is json string \
    b0b627
    -* [Issue #418](https://github.com/json-c/json-c/issues/418) - json_object_from_* return value documented incorrectly \
    b0b627
    -* [Issue #419](https://github.com/json-c/json-c/issues/419) - Suggestion: document (and define) that json_object_put() accepts NULL pointer to object \
    b0b627
    -* [Issue #420](https://github.com/json-c/json-c/issues/420) - arraylist: Fixed names of parameters for callback function \
    b0b627
    -* [Issue #421](https://github.com/json-c/json-c/issues/421) - install json_object_iterator.h header file \
    b0b627
    -* [Issue #422](https://github.com/json-c/json-c/issues/422) - json_object_get_double() does not set errno when there is no valid conversion \
    b0b627
    -* [Issue #423](https://github.com/json-c/json-c/issues/423) - memory leak \
    b0b627
    -* [Issue #424](https://github.com/json-c/json-c/issues/424) - Parse string contains "\" or "/" errors \
    b0b627
    -* [Issue #425](https://github.com/json-c/json-c/issues/425) - what this is? \
    b0b627
    -* [Issue #426](https://github.com/json-c/json-c/issues/426) - __deprecated not supported on clang. \
    b0b627
    -* [Issue #427](https://github.com/json-c/json-c/issues/427) - CMake: builds involving this target will not be correct \
    b0b627
    -* [Issue #430](https://github.com/json-c/json-c/issues/430) - json_object_object_del() and Segmentation fault \
    b0b627
    -* [Issue #431](https://github.com/json-c/json-c/issues/431) - cmake: Bump required version \
    b0b627
    -* [Issue #432](https://github.com/json-c/json-c/issues/432) - The real CMake support. \
    b0b627
    -* [Issue #433](https://github.com/json-c/json-c/issues/433) - The real CMake support. \
    b0b627
    -* [Issue #434](https://github.com/json-c/json-c/issues/434) - The real CMake support \
    b0b627
    -* [Issue #435](https://github.com/json-c/json-c/issues/435) - json_object_object_del() segmentation fault \
    b0b627
    -* [Issue #436](https://github.com/json-c/json-c/issues/436) - Improve pkgconfig setting \
    b0b627
    -* [Issue #437](https://github.com/json-c/json-c/issues/437) - Bad link in README.md \
    b0b627
    -* [Issue #438](https://github.com/json-c/json-c/issues/438) - Bad link in README.html \
    b0b627
    -* [Issue #439](https://github.com/json-c/json-c/issues/439) - reserved identifier violation \
    b0b627
    -* [Issue #440](https://github.com/json-c/json-c/issues/440) - Use of angle brackets around file names for include statements \
    b0b627
    -* [Issue #441](https://github.com/json-c/json-c/issues/441) - fix c flag loss during cmake building \
    b0b627
    -* [Issue #442](https://github.com/json-c/json-c/issues/442) - error  in configure file \
    b0b627
    -* [Issue #443](https://github.com/json-c/json-c/issues/443) - remove pretty spaces when using pretty tabs \
    b0b627
    -* [Issue #444](https://github.com/json-c/json-c/issues/444) - Document refcount of json_tokener_parse_ex return \
    b0b627
    -* [Issue #445](https://github.com/json-c/json-c/issues/445) - Add missing "make check" target to cmake config \
    b0b627
    -* [Issue #446](https://github.com/json-c/json-c/issues/446) - Forward slashes get escaped \
    b0b627
    -* [Issue #448](https://github.com/json-c/json-c/issues/448) - Buffer overflow in json-c \
    b0b627
    -* [Issue #449](https://github.com/json-c/json-c/issues/449) - Need of json_type_int64 returned by json_object_get_type() \
    b0b627
    -* [Issue #450](https://github.com/json-c/json-c/issues/450) - Allow use json-c cmake as subproject \
    b0b627
    -* [Issue #452](https://github.com/json-c/json-c/issues/452) - Update README.md \
    b0b627
    -* [Issue #453](https://github.com/json-c/json-c/issues/453) - Fixed misalignment in JSON string due to space after \n being printed... \
    b0b627
    -* [Issue #454](https://github.com/json-c/json-c/issues/454) - json_object_private: save 8 bytes in struct json_object in 64-bit arc… \
    b0b627
    -* [Issue #455](https://github.com/json-c/json-c/issues/455) - index.html:fix dead link \
    b0b627
    -* [Issue #456](https://github.com/json-c/json-c/issues/456) - STYLE.txt:remove executable permissions \
    b0b627
    -* [Issue #457](https://github.com/json-c/json-c/issues/457) - .gitignore:add build directory \
    b0b627
    -* [Issue #458](https://github.com/json-c/json-c/issues/458) - README.md:fix dead "file.html" link \
    b0b627
    -* [Issue #459](https://github.com/json-c/json-c/issues/459) - README.html:fix link to Doxygen docs, remove WIN32 link \
    b0b627
    -* [Issue #460](https://github.com/json-c/json-c/issues/460) - No docs for json_object_new_string_len() \
    b0b627
    -* [Issue #461](https://github.com/json-c/json-c/issues/461) - json_object.c:set errno in json_object_get_double() \
    b0b627
    -* [Issue #462](https://github.com/json-c/json-c/issues/462) - json_object.h:document json_object_new_string_len() \
    b0b627
    -* [Issue #463](https://github.com/json-c/json-c/issues/463) - please check newlocale api first argument valuse. \
    b0b627
    -* [Issue #465](https://github.com/json-c/json-c/issues/465) - CMakeLists.txt doesn't contain json_object_iterator.h which json.h includes \
    b0b627
    -* [Issue #466](https://github.com/json-c/json-c/issues/466) - configure:3610: error: C compiler cannot create executables \
    b0b627
    -* [Issue #467](https://github.com/json-c/json-c/issues/467) - Fix compiler warnings \
    b0b627
    -* [Issue #468](https://github.com/json-c/json-c/issues/468) - Fix compiler warnings \
    b0b627
    -* [Issue #469](https://github.com/json-c/json-c/issues/469) - Build under alpine with pecl install & docker-php-ext-enable? \
    b0b627
    -* [Issue #470](https://github.com/json-c/json-c/issues/470) - cfuhash_foreach_remove doesn't upate cfuhash_num_entries \
    b0b627
    -* [Issue #472](https://github.com/json-c/json-c/issues/472) - Segmentation fault in json_object_iter_begin \
    b0b627
    -* [Issue #473](https://github.com/json-c/json-c/issues/473) - Convert ChangeLog to valid UTF-8 encoding. \
    b0b627
    -* [Issue #474](https://github.com/json-c/json-c/issues/474) - Installation directories empty with CMake in pkg-config. \
    b0b627
    -* [Issue #475](https://github.com/json-c/json-c/issues/475) - improvement proposal for json_object_object_foreach \
    b0b627
    -* [Issue #477](https://github.com/json-c/json-c/issues/477) - Hang/Crash with large strings \
    b0b627
    -* [Issue #478](https://github.com/json-c/json-c/issues/478) - json_object_get_string_len returns 0 when value is number \
    b0b627
    -* [Issue #479](https://github.com/json-c/json-c/issues/479) - I want to use it in iOS or Android but I can't compile \
    b0b627
    -* [Issue #480](https://github.com/json-c/json-c/issues/480) - json-c-0.12.1  failed making from source code \
    b0b627
    -* [Issue #481](https://github.com/json-c/json-c/issues/481) - error while loading shared libraries: libjson-c.so.4 \
    b0b627
    -* [Issue #482](https://github.com/json-c/json-c/issues/482) - Error "double free or corruption" after free() \
    b0b627
    -* [Issue #483](https://github.com/json-c/json-c/issues/483) - compatible with rarely-used Chinese characters in GBK charset \
    b0b627
    -* [Issue #485](https://github.com/json-c/json-c/issues/485) - Install CMake module files \
    b0b627
    -* [Issue #486](https://github.com/json-c/json-c/issues/486) - In the case of negative double value, it is formatted without including ".0" \
    b0b627
    -* [Issue #488](https://github.com/json-c/json-c/issues/488) - Some APIs are not exported when built as shared lib on Win32 \
    b0b627
    -* [Issue #489](https://github.com/json-c/json-c/issues/489) - Don't use -Werror by default \
    b0b627
    -* [Issue #490](https://github.com/json-c/json-c/issues/490) - do not compile with -Werror by default \
    b0b627
    -* [Issue #491](https://github.com/json-c/json-c/issues/491) - build: add option --disable-werror to configure \
    b0b627
    -* [Issue #492](https://github.com/json-c/json-c/issues/492) - lack some quick usage in readme \
    b0b627
    -* [Issue #494](https://github.com/json-c/json-c/issues/494) - Code generator? \
    b0b627
    -* [Issue #495](https://github.com/json-c/json-c/issues/495) - README.md:fix 2 typos \
    b0b627
    -* [Issue #496](https://github.com/json-c/json-c/issues/496) - json_pointer.h:suggest minor grammar improvement for pointer doc \
    b0b627
    -* [Issue #497](https://github.com/json-c/json-c/issues/497) - add common header for all tests \
    b0b627
    -* [Issue #498](https://github.com/json-c/json-c/issues/498) - double_serializer_test fails (with valgrind) \
    b0b627
    -* [Issue #499](https://github.com/json-c/json-c/issues/499) - .travis.yml:test on more recent clang and gcc versions \
    b0b627
    -* [Issue #500](https://github.com/json-c/json-c/issues/500) - test/Makefile.am:add missing deps for test1 and test2 \
    b0b627
    -* [Issue #501](https://github.com/json-c/json-c/issues/501) - undefine NDEBUG for tests \
    b0b627
    -* [Issue #502](https://github.com/json-c/json-c/issues/502) - configure error \
    b0b627
    -* [Issue #503](https://github.com/json-c/json-c/issues/503) - json-c retuns OK when Invalid json string is passed \
    b0b627
    -* [Issue #504](https://github.com/json-c/json-c/issues/504) - json_object_put coredump \
    b0b627
    -* [Issue #505](https://github.com/json-c/json-c/issues/505) - Add vcpkg installation instructions \
    b0b627
    -* [Issue #506](https://github.com/json-c/json-c/issues/506) - Cannot parse more than one object \
    b0b627
    -* [Issue #509](https://github.com/json-c/json-c/issues/509) - Sometimes a double value is not serialized \
    b0b627
    -* [Issue #510](https://github.com/json-c/json-c/issues/510) - Bump so-name and improve CMake \
    b0b627
    -* [Issue #511](https://github.com/json-c/json-c/issues/511) - Reduce lines for better optimization \
    b0b627
    -* [Issue #512](https://github.com/json-c/json-c/issues/512) - Properly append to CMAKE_C_FLAGS string \
    b0b627
    -* [Issue #513](https://github.com/json-c/json-c/issues/513) - What does `userdata` means?And what is the case we can use it? \
    b0b627
    -* [Issue #514](https://github.com/json-c/json-c/issues/514) - Json c 0.13 \
    b0b627
    -* [Issue #515](https://github.com/json-c/json-c/issues/515) - Mies suomesta fixes segfaults and logic errors \
    b0b627
    -* [Issue #516](https://github.com/json-c/json-c/issues/516) - Lja slight mods \
    b0b627
    -* [Issue #518](https://github.com/json-c/json-c/issues/518) - Escape character  "\\003\", get unexpected value \
    b0b627
    -* [Issue #519](https://github.com/json-c/json-c/issues/519) - Add test case obj token \
    b0b627
    -* [Issue #520](https://github.com/json-c/json-c/issues/520) - Adding type uint64 \
    b0b627
    -* [Issue #521](https://github.com/json-c/json-c/issues/521) - build cmake windows 10 \
    b0b627
    -* [Issue #522](https://github.com/json-c/json-c/issues/522) - update json_visit testcase \
    b0b627
    -* [Issue #523](https://github.com/json-c/json-c/issues/523) - update tsetcase for tokener_c \
    b0b627
    -* [Issue #524](https://github.com/json-c/json-c/issues/524) - Increase coverage \
    b0b627
    -* [Issue #525](https://github.com/json-c/json-c/issues/525) - update pointer test case \
    b0b627
    -* [Issue #526](https://github.com/json-c/json-c/issues/526) - Increased the test coverage of printbuf.c 82% to 92%. \
    b0b627
    -* [Issue #527](https://github.com/json-c/json-c/issues/527) - Arraylist testcase \
    b0b627
    -* [Issue #528](https://github.com/json-c/json-c/issues/528) - Solve issue #108. Skip \u0000 while parsing. \
    b0b627
    -* [Issue #529](https://github.com/json-c/json-c/issues/529) - Increased the test coverage of json_c_version.c 0% to 100%. \
    b0b627
    -* [Issue #530](https://github.com/json-c/json-c/issues/530) - validate utf-8 string before parse \
    b0b627
    -* [Issue #531](https://github.com/json-c/json-c/issues/531) - validate utf-8 string \
    b0b627
    -* [Issue #532](https://github.com/json-c/json-c/issues/532) - json_object_object_get_ex returning the original object \
    b0b627
    -* [Issue #533](https://github.com/json-c/json-c/issues/533) - Fix "make check" \
    b0b627
    -* [Issue #535](https://github.com/json-c/json-c/issues/535) - short string optimization: excessive array length \
    b0b627
    -* [Issue #536](https://github.com/json-c/json-c/issues/536) - add json_object_new_null() \
    b0b627
    -* [Issue #538](https://github.com/json-c/json-c/issues/538) - update shortstring and arraylist parameters \
    b0b627
    -* [Issue #539](https://github.com/json-c/json-c/issues/539) - double serializes to the old value after set_double \
    b0b627
    -* [Issue #541](https://github.com/json-c/json-c/issues/541) - add coveralls auto tool to json-c \
    b0b627
    -* [Issue #542](https://github.com/json-c/json-c/issues/542) - add uint64 data to json-c \
    b0b627
    -* [Issue #543](https://github.com/json-c/json-c/issues/543) - Readme \
    b0b627
    -* [Issue #544](https://github.com/json-c/json-c/issues/544) - Increase distcheck target in cmake \
    b0b627
    -* [Issue #545](https://github.com/json-c/json-c/issues/545) - add doc target in cmake \
    b0b627
    -* [Issue #546](https://github.com/json-c/json-c/issues/546) - Add uninstall target in cmake \
    b0b627
    -* [Issue #547](https://github.com/json-c/json-c/issues/547) - modify json-c default build type, and fix up the assert() errors in t… \
    b0b627
    -* [Issue #548](https://github.com/json-c/json-c/issues/548) - Solve some problems about cmake build type (debug/release) \
    b0b627
    -* [Issue #549](https://github.com/json-c/json-c/issues/549) - lib installation issues \
    b0b627
    -* [Issue #550](https://github.com/json-c/json-c/issues/550) - Format codes with clang-format tool? \
    b0b627
    -* [Issue #551](https://github.com/json-c/json-c/issues/551) - Allow hexadecimal number format convention parsing \
    b0b627
    -* [Issue #553](https://github.com/json-c/json-c/issues/553) - Fix/clang ubsan \
    b0b627
    -* [Issue #554](https://github.com/json-c/json-c/issues/554) - RFC 8259 compatibility mode \
    b0b627
    -* [Issue #555](https://github.com/json-c/json-c/issues/555) - Format json-c with clang-format tool \
    b0b627
    -* [Issue #556](https://github.com/json-c/json-c/issues/556) - Fixes various Wreturn-type and Wimplicit-fallthrough errors on Mingw-w64 \
    b0b627
    -* [Issue #557](https://github.com/json-c/json-c/issues/557) - Add option in CMAKE to not build documentation \
    b0b627
    -* [Issue #558](https://github.com/json-c/json-c/issues/558) - modify the doc target message \
    b0b627
    -* [Issue #559](https://github.com/json-c/json-c/issues/559) - json_c_visit() not exported on Windows \
    b0b627
    -* [Issue #560](https://github.com/json-c/json-c/issues/560) - error: implicit declaration of function '_strtoi64' \
    b0b627
    -* [Issue #561](https://github.com/json-c/json-c/issues/561) - add the badge in README.md and test the coveralls \
    b0b627
    -* [Issue #562](https://github.com/json-c/json-c/issues/562) - Bugfix and testcases supplements \
    b0b627
    -* [Issue #563](https://github.com/json-c/json-c/issues/563) - Changed order of calloc args to match stdlib \
    b0b627
    -* [Issue #564](https://github.com/json-c/json-c/issues/564) - Remove autogenerated files \
    b0b627
    -* [Issue #565](https://github.com/json-c/json-c/issues/565) - test the CI and ignore this PR \
    b0b627
    -* [Issue #566](https://github.com/json-c/json-c/issues/566) - add the json_types.h to Makefile.am \
    b0b627
    -* [Issue #567](https://github.com/json-c/json-c/issues/567) - Install json_types.h with autotools build as well. \
    b0b627
    -* [Issue #568](https://github.com/json-c/json-c/issues/568) - Adding better support to MinGW \
    b0b627
    -* [Issue #569](https://github.com/json-c/json-c/issues/569) - Handling of -Bsymbolic-function in CMakeLists.txt is deficient \
    b0b627
    -* [Issue #571](https://github.com/json-c/json-c/issues/571) - CMake: Bump SONAME to 5. \
    b0b627
    -* [Issue #572](https://github.com/json-c/json-c/issues/572) - Small fixes to CMakeLists \
    b0b627
    -* [Issue #573](https://github.com/json-c/json-c/issues/573) - Fix coveralls submission. \
    b0b627
    -* [Issue #574](https://github.com/json-c/json-c/issues/574) - autogen.sh missing from repository \
    b0b627
    -* [Issue #575](https://github.com/json-c/json-c/issues/575) - Small cosmetics. \
    b0b627
    -* [Issue #576](https://github.com/json-c/json-c/issues/576) - Test coverage for json_c_version. \
    b0b627
    -* [Issue #577](https://github.com/json-c/json-c/issues/577) - Be verbose on failing json_c_version test. \
    b0b627
    -* [Issue #578](https://github.com/json-c/json-c/issues/578) - CMake: Install pkgconfig file in proper location by default \
    b0b627
    -* [Issue #579](https://github.com/json-c/json-c/issues/579) - Enforce strict prototypes. \
    b0b627
    -* [Issue #580](https://github.com/json-c/json-c/issues/580) - Fix CMake tests for enforced strict prototypes. \
    b0b627
    -* [Issue #581](https://github.com/json-c/json-c/issues/581) - CMakeLists: do not enforce strict prototypes on Windows. \
    b0b627
    diff --git a/comm/third_party/json-c/json.h b/comm/third_party/json-c/json.h
    b0b627
    deleted file mode 100644
    b0b627
    --- a/comm/third_party/json-c/json.h
    b0b627
    +++ /dev/null
    b0b627
    @@ -1,38 +0,0 @@
    b0b627
    -/*
    b0b627
    - * $Id: json.h,v 1.6 2006/01/26 02:16:28 mclark Exp $
    b0b627
    - *
    b0b627
    - * Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd.
    b0b627
    - * Michael Clark <michael@metaparadigm.com>
    b0b627
    - * Copyright (c) 2009 Hewlett-Packard Development Company, L.P.
    b0b627
    - *
    b0b627
    - * This library is free software; you can redistribute it and/or modify
    b0b627
    - * it under the terms of the MIT license. See COPYING for details.
    b0b627
    - *
    b0b627
    - */
    b0b627
    -
    b0b627
    -/**
    b0b627
    - * @file
    b0b627
    - * @brief A convenience header that may be included instead of other individual ones.
    b0b627
    - */
    b0b627
    -#ifndef _json_h_
    b0b627
    -#define _json_h_
    b0b627
    -
    b0b627
    -#ifdef __cplusplus
    b0b627
    -extern "C" {
    b0b627
    -#endif
    b0b627
    -
    b0b627
    -#include "arraylist.h"
    b0b627
    -#include "debug.h"
    b0b627
    -#include "json_c_version.h"
    b0b627
    -#include "json_object.h"
    b0b627
    -#include "json_object_iterator.h"
    b0b627
    -#include "json_pointer.h"
    b0b627
    -#include "json_tokener.h"
    b0b627
    -#include "json_util.h"
    b0b627
    -#include "linkhash.h"
    b0b627
    -
    b0b627
    -#ifdef __cplusplus
    b0b627
    -}
    b0b627
    -#endif
    b0b627
    -
    b0b627
    -#endif
    b0b627
    diff --git a/comm/third_party/json-c/json.h.cmakein b/comm/third_party/json-c/json.h.cmakein
    b0b627
    new file mode 100644
    b0b627
    --- /dev/null
    b0b627
    +++ b/comm/third_party/json-c/json.h.cmakein
    b0b627
    @@ -0,0 +1,38 @@
    b0b627
    +/*
    b0b627
    + * $Id: json.h,v 1.6 2006/01/26 02:16:28 mclark Exp $
    b0b627
    + *
    b0b627
    + * Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd.
    b0b627
    + * Michael Clark <michael@metaparadigm.com>
    b0b627
    + * Copyright (c) 2009 Hewlett-Packard Development Company, L.P.
    b0b627
    + *
    b0b627
    + * This library is free software; you can redistribute it and/or modify
    b0b627
    + * it under the terms of the MIT license. See COPYING for details.
    b0b627
    + *
    b0b627
    + */
    b0b627
    +
    b0b627
    +/**
    b0b627
    + * @file
    b0b627
    + * @brief A convenience header that may be included instead of other individual ones.
    b0b627
    + */
    b0b627
    +#ifndef _json_h_
    b0b627
    +#define _json_h_
    b0b627
    +
    b0b627
    +#ifdef __cplusplus
    b0b627
    +extern "C" {
    b0b627
    +#endif
    b0b627
    +
    b0b627
    +#include "arraylist.h"
    b0b627
    +#include "debug.h"
    b0b627
    +#include "json_c_version.h"
    b0b627
    +#include "json_object.h"
    b0b627
    +#include "json_object_iterator.h"
    b0b627
    +@JSON_H_JSON_POINTER@
    b0b627
    +#include "json_tokener.h"
    b0b627
    +#include "json_util.h"
    b0b627
    +#include "linkhash.h"
    b0b627
    +
    b0b627
    +#ifdef __cplusplus
    b0b627
    +}
    b0b627
    +#endif
    b0b627
    +
    b0b627
    +#endif
    b0b627
    diff --git a/comm/third_party/json-c/json_c_version.h b/comm/third_party/json-c/json_c_version.h
    b0b627
    --- a/comm/third_party/json-c/json_c_version.h
    b0b627
    +++ b/comm/third_party/json-c/json_c_version.h
    b0b627
    @@ -1,7 +1,7 @@
    b0b627
     /*
    b0b627
    - * Copyright (c) 2012,2017,2019,2020 Eric Hawicz
    b0b627
    + * Copyright (c) 2012,2017-2022 Eric Haszlakiewicz
    b0b627
      *
    b0b627
      * This library is free software; you can redistribute it and/or modify
    b0b627
      * it under the terms of the MIT license. See COPYING for details.
    b0b627
      */
    b0b627
     
    b0b627
    @@ -15,18 +15,18 @@
    b0b627
     #ifdef __cplusplus
    b0b627
     extern "C" {
    b0b627
     #endif
    b0b627
     
    b0b627
     #define JSON_C_MAJOR_VERSION 0
    b0b627
    -#define JSON_C_MINOR_VERSION 15
    b0b627
    +#define JSON_C_MINOR_VERSION 16
    b0b627
     #define JSON_C_MICRO_VERSION 0
    b0b627
     #define JSON_C_VERSION_NUM \
    b0b627
     	((JSON_C_MAJOR_VERSION << 16) | (JSON_C_MINOR_VERSION << 8) | JSON_C_MICRO_VERSION)
    b0b627
    -#define JSON_C_VERSION "0.15"
    b0b627
    +#define JSON_C_VERSION "0.16"
    b0b627
     
    b0b627
     #ifndef JSON_EXPORT
    b0b627
    -#if defined(_MSC_VER)
    b0b627
    +#if defined(_MSC_VER) && defined(JSON_C_DLL)
    b0b627
     #define JSON_EXPORT __declspec(dllexport)
    b0b627
     #else
    b0b627
     #define JSON_EXPORT extern
    b0b627
     #endif
    b0b627
     #endif
    b0b627
    diff --git a/comm/third_party/json-c/json_config.h.win32 b/comm/third_party/json-c/json_config.h.win32
    b0b627
    deleted file mode 100644
    b0b627
    --- a/comm/third_party/json-c/json_config.h.win32
    b0b627
    +++ /dev/null
    b0b627
    @@ -1,5 +0,0 @@
    b0b627
    -
    b0b627
    -/* Define to 1 if you have the <inttypes.h> header file. */
    b0b627
    -#if defined(_MSC_VER) && _MSC_VER >= 1800
    b0b627
    -#define JSON_C_HAVE_INTTYPES_H 1
    b0b627
    -#endif
    b0b627
    diff --git a/comm/third_party/json-c/json_object.c b/third_party/json-c/json_ob/commject.c
    b0b627
    --- a/comm/third_party/json-c/json_object.c
    b0b627
    +++ b/comm/third_party/json-c/json_object.c
    b0b627
    @@ -11,11 +11,10 @@
    b0b627
     #include "config.h"
    b0b627
     
    b0b627
     #include "strerror_override.h"
    b0b627
     
    b0b627
     #include <assert.h>
    b0b627
    -#include <ctype.h>
    b0b627
     #ifdef HAVE_LIMITS_H
    b0b627
     #include <limits.h>
    b0b627
     #endif
    b0b627
     #include <math.h>
    b0b627
     #include <stddef.h>
    b0b627
    @@ -33,12 +32,15 @@
    b0b627
     #include "math_compat.h"
    b0b627
     #include "printbuf.h"
    b0b627
     #include "snprintf_compat.h"
    b0b627
     #include "strdup_compat.h"
    b0b627
     
    b0b627
    +/* Avoid ctype.h and locale overhead */
    b0b627
    +#define is_plain_digit(c) ((c) >= '0' && (c) <= '9')
    b0b627
    +
    b0b627
     #if SIZEOF_LONG_LONG != SIZEOF_INT64_T
    b0b627
    -#error "The long long type isn't 64-bits"
    b0b627
    +#error The long long type is not 64-bits
    b0b627
     #endif
    b0b627
     
    b0b627
     #ifndef SSIZE_T_MAX
    b0b627
     #if SIZEOF_SSIZE_T == SIZEOF_INT
    b0b627
     #define SSIZE_T_MAX INT_MAX
    b0b627
    @@ -49,13 +51,10 @@
    b0b627
     #else
    b0b627
     #error Unable to determine size of ssize_t
    b0b627
     #endif
    b0b627
     #endif
    b0b627
     
    b0b627
    -// Don't define this.  It's not thread-safe.
    b0b627
    -/* #define REFCOUNT_DEBUG 1 */
    b0b627
    -
    b0b627
     const char *json_hex_chars = "0123456789abcdefABCDEF";
    b0b627
     
    b0b627
     static void json_object_generic_delete(struct json_object *jso);
    b0b627
     
    b0b627
     #if defined(_MSC_VER) && (_MSC_VER <= 1800)
    b0b627
    @@ -157,45 +156,10 @@ static json_object_to_json_string_fn _js
    b0b627
      * This should be used rather than assert() for unconditional abortion
    b0b627
      * (in particular for code paths which are never supposed to be run).
    b0b627
      * */
    b0b627
     JSON_NORETURN static void json_abort(const char *message);
    b0b627
     
    b0b627
    -/* ref count debugging */
    b0b627
    -
    b0b627
    -#ifdef REFCOUNT_DEBUG
    b0b627
    -
    b0b627
    -static struct lh_table *json_object_table;
    b0b627
    -
    b0b627
    -static void json_object_init(void) __attribute__((constructor));
    b0b627
    -static void json_object_init(void)
    b0b627
    -{
    b0b627
    -	MC_DEBUG("json_object_init: creating object table\n");
    b0b627
    -	json_object_table = lh_kptr_table_new(128, NULL);
    b0b627
    -}
    b0b627
    -
    b0b627
    -static void json_object_fini(void) __attribute__((destructor));
    b0b627
    -static void json_object_fini(void)
    b0b627
    -{
    b0b627
    -	struct lh_entry *ent;
    b0b627
    -	if (MC_GET_DEBUG())
    b0b627
    -	{
    b0b627
    -		if (json_object_table->count)
    b0b627
    -		{
    b0b627
    -			MC_DEBUG("json_object_fini: %d referenced objects at exit\n",
    b0b627
    -			         json_object_table->count);
    b0b627
    -			lh_foreach(json_object_table, ent)
    b0b627
    -			{
    b0b627
    -				struct json_object *obj = (struct json_object *)lh_entry_v(ent);
    b0b627
    -				MC_DEBUG("\t%s:%p\n", json_type_to_name(obj->o_type), obj);
    b0b627
    -			}
    b0b627
    -		}
    b0b627
    -	}
    b0b627
    -	MC_DEBUG("json_object_fini: freeing object table\n");
    b0b627
    -	lh_table_free(json_object_table);
    b0b627
    -}
    b0b627
    -#endif /* REFCOUNT_DEBUG */
    b0b627
    -
    b0b627
     /* helper for accessing the optimized string data component in json_object
    b0b627
      */
    b0b627
     static inline char *get_string_component_mutable(struct json_object *jso)
    b0b627
     {
    b0b627
     	if (JC_STRING_C(jso)->len < 0)
    b0b627
    @@ -212,14 +176,15 @@ static inline const char *get_string_com
    b0b627
     
    b0b627
     /* string escaping */
    b0b627
     
    b0b627
     static int json_escape_str(struct printbuf *pb, const char *str, size_t len, int flags)
    b0b627
     {
    b0b627
    -	int pos = 0, start_offset = 0;
    b0b627
    +	size_t pos = 0, start_offset = 0;
    b0b627
     	unsigned char c;
    b0b627
    -	while (len--)
    b0b627
    +	while (len)
    b0b627
     	{
    b0b627
    +		--len;
    b0b627
     		c = str[pos];
    b0b627
     		switch (c)
    b0b627
     		{
    b0b627
     		case '\b':
    b0b627
     		case '\n':
    b0b627
    @@ -233,11 +198,11 @@ static int json_escape_str(struct printb
    b0b627
     			{
    b0b627
     				pos++;
    b0b627
     				break;
    b0b627
     			}
    b0b627
     
    b0b627
    -			if (pos - start_offset > 0)
    b0b627
    +			if (pos > start_offset)
    b0b627
     				printbuf_memappend(pb, str + start_offset, pos - start_offset);
    b0b627
     
    b0b627
     			if (c == '\b')
    b0b627
     				printbuf_memappend(pb, "\\b", 2);
    b0b627
     			else if (c == '\n')
    b0b627
    @@ -259,11 +224,11 @@ static int json_escape_str(struct printb
    b0b627
     			break;
    b0b627
     		default:
    b0b627
     			if (c < ' ')
    b0b627
     			{
    b0b627
     				char sbuf[7];
    b0b627
    -				if (pos - start_offset > 0)
    b0b627
    +				if (pos > start_offset)
    b0b627
     					printbuf_memappend(pb, str + start_offset,
    b0b627
     					                   pos - start_offset);
    b0b627
     				snprintf(sbuf, sizeof(sbuf), "\\u00%c%c", json_hex_chars[c >> 4],
    b0b627
     				         json_hex_chars[c & 0xf]);
    b0b627
     				printbuf_memappend_fast(pb, sbuf, (int)sizeof(sbuf) - 1);
    b0b627
    @@ -271,11 +236,11 @@ static int json_escape_str(struct printb
    b0b627
     			}
    b0b627
     			else
    b0b627
     				pos++;
    b0b627
     		}
    b0b627
     	}
    b0b627
    -	if (pos - start_offset > 0)
    b0b627
    +	if (pos > start_offset)
    b0b627
     		printbuf_memappend(pb, str + start_offset, pos - start_offset);
    b0b627
     	return 0;
    b0b627
     }
    b0b627
     
    b0b627
     /* reference counting */
    b0b627
    @@ -335,14 +300,10 @@ int json_object_put(struct json_object *
    b0b627
     
    b0b627
     /* generic object construction and destruction parts */
    b0b627
     
    b0b627
     static void json_object_generic_delete(struct json_object *jso)
    b0b627
     {
    b0b627
    -#ifdef REFCOUNT_DEBUG
    b0b627
    -	MC_DEBUG("json_object_delete_%s: %p\n", json_type_to_name(jso->o_type), jso);
    b0b627
    -	lh_table_delete(json_object_table, jso);
    b0b627
    -#endif /* REFCOUNT_DEBUG */
    b0b627
     	printbuf_free(jso->_pb);
    b0b627
     	free(jso);
    b0b627
     }
    b0b627
     
    b0b627
     static inline struct json_object *json_object_new(enum json_type o_type, size_t alloc_size,
    b0b627
    @@ -360,14 +321,10 @@ static inline struct json_object *json_o
    b0b627
     	jso->_pb = NULL;
    b0b627
     	jso->_user_delete = NULL;
    b0b627
     	jso->_userdata = NULL;
    b0b627
     	//jso->...   // Type-specific fields must be set by caller
    b0b627
     
    b0b627
    -#ifdef REFCOUNT_DEBUG
    b0b627
    -	lh_table_insert(json_object_table, jso, jso);
    b0b627
    -	MC_DEBUG("json_object_new_%s: %p\n", json_type_to_name(jso->o_type), jso);
    b0b627
    -#endif /* REFCOUNT_DEBUG */
    b0b627
     	return jso;
    b0b627
     }
    b0b627
     
    b0b627
     /* type checking functions */
    b0b627
     
    b0b627
    @@ -540,11 +497,11 @@ static int json_object_object_to_json_st
    b0b627
     		return printbuf_strappend(pb, /*{*/ "}");
    b0b627
     }
    b0b627
     
    b0b627
     static void json_object_lh_entry_free(struct lh_entry *ent)
    b0b627
     {
    b0b627
    -	if (!ent->k_is_constant)
    b0b627
    +	if (!lh_entry_k_is_constant(ent))
    b0b627
     		free(lh_entry_k(ent));
    b0b627
     	json_object_put((struct json_object *)lh_entry_v(ent));
    b0b627
     }
    b0b627
     
    b0b627
     static void json_object_object_delete(struct json_object *jso_base)
    b0b627
    @@ -603,19 +560,19 @@ int json_object_object_add_ex(struct jso
    b0b627
     		return -1;
    b0b627
     
    b0b627
     	if (!existing_entry)
    b0b627
     	{
    b0b627
     		const void *const k =
    b0b627
    -		    (opts & JSON_C_OBJECT_KEY_IS_CONSTANT) ? (const void *)key : strdup(key);
    b0b627
    +		    (opts & JSON_C_OBJECT_ADD_CONSTANT_KEY) ? (const void *)key : strdup(key);
    b0b627
     		if (k == NULL)
    b0b627
     			return -1;
    b0b627
     		return lh_table_insert_w_hash(JC_OBJECT(jso)->c_object, k, val, hash, opts);
    b0b627
     	}
    b0b627
     	existing_value = (json_object *)lh_entry_v(existing_entry);
    b0b627
     	if (existing_value)
    b0b627
     		json_object_put(existing_value);
    b0b627
    -	existing_entry->v = val;
    b0b627
    +	lh_entry_set_val(existing_entry, val);
    b0b627
     	return 0;
    b0b627
     }
    b0b627
     
    b0b627
     int json_object_object_add(struct json_object *jso, const char *key, struct json_object *val)
    b0b627
     {
    b0b627
    @@ -733,11 +690,11 @@ struct json_object *json_object_new_int(
    b0b627
     	return json_object_new_int64(i);
    b0b627
     }
    b0b627
     
    b0b627
     int32_t json_object_get_int(const struct json_object *jso)
    b0b627
     {
    b0b627
    -	int64_t cint64=0;
    b0b627
    +	int64_t cint64 = 0;
    b0b627
     	double cdouble;
    b0b627
     	enum json_type o_type;
    b0b627
     
    b0b627
     	if (!jso)
    b0b627
     		return 0;
    b0b627
    @@ -974,30 +931,59 @@ int json_c_set_serialization_double_form
    b0b627
     			tls_serialization_float_format = NULL;
    b0b627
     		}
    b0b627
     #endif
    b0b627
     		if (global_serialization_float_format)
    b0b627
     			free(global_serialization_float_format);
    b0b627
    -		global_serialization_float_format = double_format ? strdup(double_format) : NULL;
    b0b627
    +		if (double_format)
    b0b627
    +		{
    b0b627
    +			char *p = strdup(double_format);
    b0b627
    +			if (p == NULL)
    b0b627
    +			{
    b0b627
    +				_json_c_set_last_err("json_c_set_serialization_double_format: "
    b0b627
    +				                     "out of memory\n");
    b0b627
    +				return -1;
    b0b627
    +			}
    b0b627
    +			global_serialization_float_format = p;
    b0b627
    +		}
    b0b627
    +		else
    b0b627
    +		{
    b0b627
    +			global_serialization_float_format = NULL;
    b0b627
    +		}
    b0b627
     	}
    b0b627
     	else if (global_or_thread == JSON_C_OPTION_THREAD)
    b0b627
     	{
    b0b627
     #if defined(HAVE___THREAD)
    b0b627
     		if (tls_serialization_float_format)
    b0b627
     		{
    b0b627
     			free(tls_serialization_float_format);
    b0b627
     			tls_serialization_float_format = NULL;
    b0b627
     		}
    b0b627
    -		tls_serialization_float_format = double_format ? strdup(double_format) : NULL;
    b0b627
    +		if (double_format)
    b0b627
    +		{
    b0b627
    +			char *p = strdup(double_format);
    b0b627
    +			if (p == NULL)
    b0b627
    +			{
    b0b627
    +				_json_c_set_last_err("json_c_set_serialization_double_format: "
    b0b627
    +				                     "out of memory\n");
    b0b627
    +				return -1;
    b0b627
    +			}
    b0b627
    +			tls_serialization_float_format = p;
    b0b627
    +		}
    b0b627
    +		else
    b0b627
    +		{
    b0b627
    +			tls_serialization_float_format = NULL;
    b0b627
    +		}
    b0b627
     #else
    b0b627
    -		_json_c_set_last_err("json_c_set_option: not compiled with __thread support\n");
    b0b627
    +		_json_c_set_last_err("json_c_set_serialization_double_format: not compiled "
    b0b627
    +		                     "with __thread support\n");
    b0b627
     		return -1;
    b0b627
     #endif
    b0b627
     	}
    b0b627
     	else
    b0b627
     	{
    b0b627
    -		_json_c_set_last_err("json_c_set_option: invalid global_or_thread value: %d\n",
    b0b627
    -		                     global_or_thread);
    b0b627
    +		_json_c_set_last_err("json_c_set_serialization_double_format: invalid "
    b0b627
    +		                     "global_or_thread value: %d\n", global_or_thread);
    b0b627
     		return -1;
    b0b627
     	}
    b0b627
     	return 0;
    b0b627
     }
    b0b627
     
    b0b627
    @@ -1054,12 +1040,11 @@ static int json_object_double_to_json_st
    b0b627
     
    b0b627
     		if (format == std_format || strstr(format, ".0f") == NULL)
    b0b627
     			format_drops_decimals = 1;
    b0b627
     
    b0b627
     		looks_numeric = /* Looks like *some* kind of number */
    b0b627
    -		    isdigit((unsigned char)buf[0]) ||
    b0b627
    -		    (size > 1 && buf[0] == '-' && isdigit((unsigned char)buf[1]));
    b0b627
    +		    is_plain_digit(buf[0]) || (size > 1 && buf[0] == '-' && is_plain_digit(buf[1]));
    b0b627
     
    b0b627
     		if (size < (int)sizeof(buf) - 2 && looks_numeric && !p && /* Has no decimal point */
    b0b627
     		    strchr(buf, 'e') == NULL && /* Not scientific notation */
    b0b627
     		    format_drops_decimals)
    b0b627
     		{
    b0b627
    @@ -1252,21 +1237,21 @@ static struct json_object *_json_object_
    b0b627
     {
    b0b627
     	size_t objsize;
    b0b627
     	struct json_object_string *jso;
    b0b627
     
    b0b627
     	/*
    b0b627
    -     * Structures           Actual memory layout
    b0b627
    -     * -------------------  --------------------
    b0b627
    +	 * Structures           Actual memory layout
    b0b627
    +	 * -------------------  --------------------
    b0b627
     	 * [json_object_string  [json_object_string
    b0b627
     	 *  [json_object]        [json_object]
    b0b627
    -     *  ...other fields...   ...other fields...
    b0b627
    +	 *  ...other fields...   ...other fields...
    b0b627
     	 *  c_string]            len
    b0b627
    -     *                       bytes
    b0b627
    +	 *                       bytes
    b0b627
     	 *                       of
    b0b627
     	 *                       string
    b0b627
     	 *                       data
    b0b627
    -     *                       \0]
    b0b627
    +	 *                       \0]
    b0b627
     	 */
    b0b627
     	if (len > (SSIZE_T_MAX - (sizeof(*jso) - sizeof(jso->c_string)) - 1))
    b0b627
     		return NULL;
    b0b627
     	objsize = (sizeof(*jso) - sizeof(jso->c_string)) + len + 1;
    b0b627
     	if (len < sizeof(void *))
    b0b627
    @@ -1279,11 +1264,12 @@ static struct json_object *_json_object_
    b0b627
     
    b0b627
     	if (!jso)
    b0b627
     		return NULL;
    b0b627
     	jso->len = len;
    b0b627
     	memcpy(jso->c_string.idata, s, len);
    b0b627
    -	jso->c_string.idata[len] = '\0';
    b0b627
    +	// Cast below needed for Clang UB sanitizer
    b0b627
    +	((char *)jso->c_string.idata)[len] = '\0';
    b0b627
     	return &jso->base;
    b0b627
     }
    b0b627
     
    b0b627
     struct json_object *json_object_new_string(const char *s)
    b0b627
     {
    b0b627
    @@ -1303,22 +1289,24 @@ const char *json_object_get_string(struc
    b0b627
     	{
    b0b627
     	case json_type_string: return get_string_component(jso);
    b0b627
     	default: return json_object_to_json_string(jso);
    b0b627
     	}
    b0b627
     }
    b0b627
    +
    b0b627
    +static inline ssize_t _json_object_get_string_len(const struct json_object_string *jso)
    b0b627
    +{
    b0b627
    +	ssize_t len;
    b0b627
    +	len = jso->len;
    b0b627
    +	return (len < 0) ? -(ssize_t)len : len;
    b0b627
    +}
    b0b627
     int json_object_get_string_len(const struct json_object *jso)
    b0b627
     {
    b0b627
    -	ssize_t len;
    b0b627
     	if (!jso)
    b0b627
     		return 0;
    b0b627
     	switch (jso->o_type)
    b0b627
     	{
    b0b627
    -	case json_type_string:
    b0b627
    -	{
    b0b627
    -		len = JC_STRING_C(jso)->len;
    b0b627
    -		return (len < 0) ? -(ssize_t)len : len;
    b0b627
    -	}
    b0b627
    +	case json_type_string: return _json_object_get_string_len(JC_STRING_C(jso));
    b0b627
     	default: return 0;
    b0b627
     	}
    b0b627
     }
    b0b627
     
    b0b627
     static int _json_object_set_string_len(json_object *jso, const char *s, size_t len)
    b0b627
    @@ -1327,13 +1315,14 @@ static int _json_object_set_string_len(j
    b0b627
     	ssize_t curlen;
    b0b627
     	ssize_t newlen;
    b0b627
     	if (jso == NULL || jso->o_type != json_type_string)
    b0b627
     		return 0;
    b0b627
     
    b0b627
    -	if (len >= SSIZE_T_MAX - 1)
    b0b627
    +	if (len >= INT_MAX - 1)
    b0b627
     		// jso->len is a signed ssize_t, so it can't hold the
    b0b627
    -		// full size_t range.
    b0b627
    +		// full size_t range. json_object_get_string_len returns
    b0b627
    +		// length as int, cap length at INT_MAX.
    b0b627
     		return 0;
    b0b627
     
    b0b627
     	dstbuf = get_string_component_mutable(jso);
    b0b627
     	curlen = JC_STRING(jso)->len;
    b0b627
     	if (curlen < 0)
    b0b627
    @@ -1603,13 +1592,14 @@ int json_object_equal(struct json_object
    b0b627
     		return (int1->cint.c_uint64 == (uint64_t)int2->cint.c_int64);
    b0b627
     	}
    b0b627
     
    b0b627
     	case json_type_string:
    b0b627
     	{
    b0b627
    -		return (json_object_get_string_len(jso1) == json_object_get_string_len(jso2) &&
    b0b627
    +		return (_json_object_get_string_len(JC_STRING(jso1)) ==
    b0b627
    +		            _json_object_get_string_len(JC_STRING(jso2)) &&
    b0b627
     		        memcmp(get_string_component(jso1), get_string_component(jso2),
    b0b627
    -		               json_object_get_string_len(jso1)) == 0);
    b0b627
    +		               _json_object_get_string_len(JC_STRING(jso1))) == 0);
    b0b627
     	}
    b0b627
     
    b0b627
     	case json_type_object: return json_object_all_values_equal(jso1, jso2);
    b0b627
     
    b0b627
     	case json_type_array: return json_array_equal(jso1, jso2);
    b0b627
    @@ -1626,18 +1616,26 @@ static int json_object_copy_serializer_d
    b0b627
     		return 0;
    b0b627
     
    b0b627
     	if (dst->_to_json_string == json_object_userdata_to_json_string ||
    b0b627
     	    dst->_to_json_string == _json_object_userdata_to_json_string)
    b0b627
     	{
    b0b627
    -		dst->_userdata = strdup(src->_userdata);
    b0b627
    +		char *p;
    b0b627
    +		assert(src->_userdata);
    b0b627
    +		p = strdup(src->_userdata);
    b0b627
    +		if (p == NULL)
    b0b627
    +		{
    b0b627
    +			_json_c_set_last_err("json_object_copy_serializer_data: out of memory\n");
    b0b627
    +			return -1;
    b0b627
    +		}
    b0b627
    +		dst->_userdata = p;
    b0b627
     	}
    b0b627
     	// else if ... other supported serializers ...
    b0b627
     	else
    b0b627
     	{
    b0b627
     		_json_c_set_last_err(
    b0b627
    -		    "json_object_deep_copy: unable to copy unknown serializer data: %p\n",
    b0b627
    -		    (void *)dst->_to_json_string);
    b0b627
    +		    "json_object_copy_serializer_data: unable to copy unknown serializer data: "
    b0b627
    +		    "%p\n", (void *)dst->_to_json_string);
    b0b627
     		return -1;
    b0b627
     	}
    b0b627
     	dst->_user_delete = src->_user_delete;
    b0b627
     	return 0;
    b0b627
     }
    b0b627
    @@ -1670,11 +1668,14 @@ int json_c_shallow_copy_default(json_obj
    b0b627
     			break;
    b0b627
     		default: json_abort("invalid cint_type");
    b0b627
     		}
    b0b627
     		break;
    b0b627
     
    b0b627
    -	case json_type_string: *dst = json_object_new_string(get_string_component(src)); break;
    b0b627
    +	case json_type_string:
    b0b627
    +		*dst = json_object_new_string_len(get_string_component(src),
    b0b627
    +		                                  _json_object_get_string_len(JC_STRING(src)));
    b0b627
    +		break;
    b0b627
     
    b0b627
     	case json_type_object: *dst = json_object_new_object(); break;
    b0b627
     
    b0b627
     	case json_type_array: *dst = json_object_new_array(); break;
    b0b627
     
    b0b627
    @@ -1722,12 +1723,12 @@ static int json_object_deep_copy_recursi
    b0b627
     		{
    b0b627
     			struct json_object *jso = NULL;
    b0b627
     			/* This handles the `json_type_null` case */
    b0b627
     			if (!iter.val)
    b0b627
     				jso = NULL;
    b0b627
    -			else if (json_object_deep_copy_recursive(iter.val, src, iter.key, -1, &jso,
    b0b627
    -			                                         shallow_copy) < 0)
    b0b627
    +			else if (json_object_deep_copy_recursive(iter.val, src, iter.key, UINT_MAX,
    b0b627
    +			                                         &jso, shallow_copy) < 0)
    b0b627
     			{
    b0b627
     				json_object_put(jso);
    b0b627
     				return -1;
    b0b627
     			}
    b0b627
     
    b0b627
    @@ -1787,11 +1788,11 @@ int json_object_deep_copy(struct json_ob
    b0b627
     	}
    b0b627
     
    b0b627
     	if (shallow_copy == NULL)
    b0b627
     		shallow_copy = json_c_shallow_copy_default;
    b0b627
     
    b0b627
    -	rc = json_object_deep_copy_recursive(src, NULL, NULL, -1, dst, shallow_copy);
    b0b627
    +	rc = json_object_deep_copy_recursive(src, NULL, NULL, UINT_MAX, dst, shallow_copy);
    b0b627
     	if (rc < 0)
    b0b627
     	{
    b0b627
     		json_object_put(*dst);
    b0b627
     		*dst = NULL;
    b0b627
     	}
    b0b627
    diff --git a/comm/third_party/json-c/json_object.h b/third_party/json-c/json_ob/commject.h
    b0b627
    --- a/comm/third_party/json-c/json_object.h
    b0b627
    +++ b/comm/third_party/json-c/json_object.h
    b0b627
    @@ -50,11 +50,11 @@ extern "C" {
    b0b627
     /**
    b0b627
      * A flag for the json_object_to_json_string_ext() and
    b0b627
      * json_object_to_file_ext() functions which causes
    b0b627
      * the output to be formatted.
    b0b627
      *
    b0b627
    - * See the "Two Space Tab" option at http://jsonformatter.curiousconcept.com/
    b0b627
    + * See the "Two Space Tab" option at https://jsonformatter.curiousconcept.com/
    b0b627
      * for an example of the format.
    b0b627
      */
    b0b627
     #define JSON_C_TO_STRING_PRETTY (1 << 1)
    b0b627
     /**
    b0b627
      * A flag for the json_object_to_json_string_ext() and
    b0b627
    @@ -98,13 +98,21 @@ extern "C" {
    b0b627
      * justified.
    b0b627
      * The general use-case for this flag is cases where the
    b0b627
      * key is given as a real constant value in the function
    b0b627
      * call, e.g. as in
    b0b627
      *   json_object_object_add_ex(obj, "ip", json,
    b0b627
    - *       JSON_C_OBJECT_KEY_IS_CONSTANT);
    b0b627
    + *       JSON_C_OBJECT_ADD_CONSTANT_KEY);
    b0b627
      */
    b0b627
    -#define JSON_C_OBJECT_KEY_IS_CONSTANT (1 << 2)
    b0b627
    +#define JSON_C_OBJECT_ADD_CONSTANT_KEY (1 << 2)
    b0b627
    +/**
    b0b627
    + * This flag is an alias to JSON_C_OBJECT_ADD_CONSTANT_KEY.
    b0b627
    + * Historically, this flag was used first and the new name
    b0b627
    + * JSON_C_OBJECT_ADD_CONSTANT_KEY was introduced for version
    b0b627
    + * 0.16.00 in order to have regular naming.
    b0b627
    + * Use of this flag is now legacy.
    b0b627
    + */
    b0b627
    +#define JSON_C_OBJECT_KEY_IS_CONSTANT  JSON_C_OBJECT_ADD_CONSTANT_KEY
    b0b627
     
    b0b627
     /**
    b0b627
      * Set the global value of an option, which will apply to all
    b0b627
      * current and future threads that have not set a thread-local value.
    b0b627
      *
    b0b627
    @@ -129,11 +137,11 @@ extern "C" {
    b0b627
      * - Using an object field or array index (retrieved through
    b0b627
      *    `json_object_object_get()` or `json_object_array_get_idx()`)
    b0b627
      *    beyond the lifetime of the parent object.
    b0b627
      * - Detaching an object field or array index from its parent object
    b0b627
      *    (using `json_object_object_del()` or `json_object_array_del_idx()`)
    b0b627
    - * - Sharing a json_object with multiple (not necesarily parallel) threads
    b0b627
    + * - Sharing a json_object with multiple (not necessarily parallel) threads
    b0b627
      *    of execution that all expect to free it (with `json_object_put()`) when
    b0b627
      *    they're done.
    b0b627
      *
    b0b627
      * @param obj the json_object instance
    b0b627
      * @see json_object_put()
    b0b627
    @@ -468,23 +476,23 @@ JSON_EXPORT void json_object_object_del(
    b0b627
      * @param obj the json_object instance
    b0b627
      * @param key the local name for the char* key variable defined in the body
    b0b627
      * @param val the local name for the json_object* object variable defined in
    b0b627
      *            the body
    b0b627
      */
    b0b627
    -#if defined(__GNUC__) && !defined(__STRICT_ANSI__) && __STDC_VERSION__ >= 199901L
    b0b627
    +#if defined(__GNUC__) && !defined(__STRICT_ANSI__) && (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
    b0b627
     
    b0b627
     #define json_object_object_foreach(obj, key, val)                                \
    b0b627
     	char *key = NULL;                                                        \
    b0b627
     	struct json_object *val __attribute__((__unused__)) = NULL;              \
    b0b627
    -	for (struct lh_entry *entry##key = json_object_get_object(obj)->head,    \
    b0b627
    +	for (struct lh_entry *entry##key = lh_table_head(json_object_get_object(obj)),    \
    b0b627
     	                     *entry_next##key = NULL;                            \
    b0b627
     	     ({                                                                  \
    b0b627
     		     if (entry##key)                                             \
    b0b627
     		     {                                                           \
    b0b627
     			     key = (char *)lh_entry_k(entry##key);               \
    b0b627
     			     val = (struct json_object *)lh_entry_v(entry##key); \
    b0b627
    -			     entry_next##key = entry##key->next;                 \
    b0b627
    +			     entry_next##key = lh_entry_next(entry##key);        \
    b0b627
     		     };                                                          \
    b0b627
     		     entry##key;                                                 \
    b0b627
     	     });                                                                 \
    b0b627
     	     entry##key = entry_next##key)
    b0b627
     
    b0b627
    @@ -493,29 +501,29 @@ JSON_EXPORT void json_object_object_del(
    b0b627
     #define json_object_object_foreach(obj, key, val)                              \
    b0b627
     	char *key = NULL;                                                      \
    b0b627
     	struct json_object *val = NULL;                                        \
    b0b627
     	struct lh_entry *entry##key;                                           \
    b0b627
     	struct lh_entry *entry_next##key = NULL;                               \
    b0b627
    -	for (entry##key = json_object_get_object(obj)->head;                   \
    b0b627
    +	for (entry##key = lh_table_head(json_object_get_object(obj));          \
    b0b627
     	     (entry##key ? (key = (char *)lh_entry_k(entry##key),              \
    b0b627
     	                   val = (struct json_object *)lh_entry_v(entry##key), \
    b0b627
    -	                   entry_next##key = entry##key->next, entry##key)     \
    b0b627
    +	                   entry_next##key = lh_entry_next(entry##key), entry##key)     \
    b0b627
     	                 : 0);                                                 \
    b0b627
     	     entry##key = entry_next##key)
    b0b627
     
    b0b627
    -#endif /* defined(__GNUC__) && !defined(__STRICT_ANSI__) && __STDC_VERSION__ >= 199901L */
    b0b627
    +#endif /* defined(__GNUC__) && !defined(__STRICT_ANSI__) && (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) */
    b0b627
     
    b0b627
     /** Iterate through all keys and values of an object (ANSI C Safe)
    b0b627
      * @param obj the json_object instance
    b0b627
      * @param iter the object iterator, use type json_object_iter
    b0b627
      */
    b0b627
     #define json_object_object_foreachC(obj, iter)                                                  \
    b0b627
    -	for (iter.entry = json_object_get_object(obj)->head;                                    \
    b0b627
    +	for (iter.entry = lh_table_head(json_object_get_object(obj));                                    \
    b0b627
     	     (iter.entry ? (iter.key = (char *)lh_entry_k(iter.entry),                          \
    b0b627
     	                   iter.val = (struct json_object *)lh_entry_v(iter.entry), iter.entry) \
    b0b627
     	                 : 0);                                                                  \
    b0b627
    -	     iter.entry = iter.entry->next)
    b0b627
    +	     iter.entry = lh_entry_next(iter.entry))
    b0b627
     
    b0b627
     /* Array type methods */
    b0b627
     
    b0b627
     /** Create a new empty json_object of type json_type_array
    b0b627
      * with 32 slots allocated.
    b0b627
    @@ -654,12 +662,13 @@ JSON_EXPORT struct json_object *json_obj
    b0b627
     /** Get the json_bool value of a json_object
    b0b627
      *
    b0b627
      * The type is coerced to a json_bool if the passed object is not a json_bool.
    b0b627
      * integer and double objects will return 0 if there value is zero
    b0b627
      * or 1 otherwise. If the passed object is a string it will return
    b0b627
    - * 1 if it has a non zero length. If any other object type is passed
    b0b627
    - * 1 will be returned if the object is not NULL.
    b0b627
    + * 1 if it has a non zero length. 
    b0b627
    + * If any other object type is passed 0 will be returned, even non-empty
    b0b627
    + *  json_type_array and json_type_object objects.
    b0b627
      *
    b0b627
      * @param obj the json_object instance
    b0b627
      * @returns a json_bool
    b0b627
      */
    b0b627
     JSON_EXPORT json_bool json_object_get_boolean(const struct json_object *obj);
    b0b627
    @@ -736,11 +745,11 @@ JSON_EXPORT int json_object_set_int(stru
    b0b627
      * is set to INT64_MIN.
    b0b627
      * Neither overflow nor underflow affect the return value.
    b0b627
      *
    b0b627
      * @param obj the json_object instance
    b0b627
      * @param val the value to add
    b0b627
    - * @returns 1 if the increment succeded, 0 otherwise
    b0b627
    + * @returns 1 if the increment succeeded, 0 otherwise
    b0b627
      */
    b0b627
     JSON_EXPORT int json_object_int_inc(struct json_object *obj, int64_t val);
    b0b627
     
    b0b627
     /** Get the int value of a json_object
    b0b627
      *
    b0b627
    @@ -1053,11 +1062,11 @@ JSON_EXPORT json_c_shallow_copy_fn json_
    b0b627
      *            make sure this pointer is initialized to NULL
    b0b627
      * @param shallow_copy an optional function to copy individual objects, needed
    b0b627
      *                     when custom serializers are in use.  See also
    b0b627
      *                     json_object set_serializer.
    b0b627
      *
    b0b627
    - * @returns 0 if the copy went well, -1 if an error occured during copy
    b0b627
    + * @returns 0 if the copy went well, -1 if an error occurred during copy
    b0b627
      *          or if the destination pointer is non-NULL
    b0b627
      */
    b0b627
     
    b0b627
     JSON_EXPORT int json_object_deep_copy(struct json_object *src, struct json_object **dst,
    b0b627
                                           json_c_shallow_copy_fn *shallow_copy);
    b0b627
    diff --git a/comm/third_party/json-c/json_object_iterator.c b/third_party/json-c/json_ob/commject_iterator.c
    b0b627
    --- a/comm/third_party/json-c/json_object_iterator.c
    b0b627
    +++ b/comm/third_party/json-c/json_object_iterator.c
    b0b627
    @@ -69,11 +69,11 @@ struct json_object_iterator json_object_
    b0b627
     	pTable = json_object_get_object(obj);
    b0b627
     	JASSERT(NULL != pTable);
    b0b627
     
    b0b627
     	/// @note For a pair-less Object, head is NULL, which matches our
    b0b627
     	///       definition of the "end" iterator
    b0b627
    -	iter.opaque_ = pTable->head;
    b0b627
    +	iter.opaque_ = lh_table_head(pTable);
    b0b627
     	return iter;
    b0b627
     }
    b0b627
     
    b0b627
     /**
    b0b627
      * ****************************************************************************
    b0b627
    @@ -96,11 +96,11 @@ struct json_object_iterator json_object_
    b0b627
     void json_object_iter_next(struct json_object_iterator *iter)
    b0b627
     {
    b0b627
     	JASSERT(NULL != iter);
    b0b627
     	JASSERT(kObjectEndIterValue != iter->opaque_);
    b0b627
     
    b0b627
    -	iter->opaque_ = ((const struct lh_entry *)iter->opaque_)->next;
    b0b627
    +	iter->opaque_ = lh_entry_next(((const struct lh_entry *)iter->opaque_));
    b0b627
     }
    b0b627
     
    b0b627
     /**
    b0b627
      * ****************************************************************************
    b0b627
      */
    b0b627
    diff --git a/comm/third_party/json-c/json_pointer.c b/comm/third_party/json-c/json_pointer.c
    b0b627
    --- a/comm/third_party/json-c/json_pointer.c
    b0b627
    +++ b/comm/third_party/json-c/json_pointer.c
    b0b627
    @@ -8,20 +8,22 @@
    b0b627
     
    b0b627
     #include "config.h"
    b0b627
     
    b0b627
     #include "strerror_override.h"
    b0b627
     
    b0b627
    -#include <ctype.h>
    b0b627
     #include <stdarg.h>
    b0b627
     #include <stdio.h>
    b0b627
     #include <stdlib.h>
    b0b627
     #include <string.h>
    b0b627
     
    b0b627
     #include "json_pointer.h"
    b0b627
     #include "strdup_compat.h"
    b0b627
     #include "vasprintf_compat.h"
    b0b627
     
    b0b627
    +/* Avoid ctype.h and locale overhead */
    b0b627
    +#define is_plain_digit(c) ((c) >= '0' && (c) <= '9')
    b0b627
    +
    b0b627
     /**
    b0b627
      * JavaScript Object Notation (JSON) Pointer
    b0b627
      *   RFC 6901 - https://tools.ietf.org/html/rfc6901
    b0b627
      */
    b0b627
     
    b0b627
    @@ -45,11 +47,11 @@ static int is_valid_index(struct json_ob
    b0b627
     	/* this code-path optimizes a bit, for when we reference the 0-9 index range
    b0b627
     	 * in a JSON array and because leading zeros not allowed
    b0b627
     	 */
    b0b627
     	if (len == 1)
    b0b627
     	{
    b0b627
    -		if (isdigit((unsigned char)path[0]))
    b0b627
    +		if (is_plain_digit(path[0]))
    b0b627
     		{
    b0b627
     			*idx = (path[0] - '0');
    b0b627
     			goto check_oob;
    b0b627
     		}
    b0b627
     		errno = EINVAL;
    b0b627
    @@ -62,11 +64,11 @@ static int is_valid_index(struct json_ob
    b0b627
     		return 0;
    b0b627
     	}
    b0b627
     	/* RFC states base-10 decimals */
    b0b627
     	for (i = 0; i < len; i++)
    b0b627
     	{
    b0b627
    -		if (!isdigit((unsigned char)path[i]))
    b0b627
    +		if (!is_plain_digit(path[i]))
    b0b627
     		{
    b0b627
     			errno = EINVAL;
    b0b627
     			return 0;
    b0b627
     		}
    b0b627
     	}
    b0b627
    diff --git a/comm/third_party/json-c/json_tokener.c b/comm/third_party/json-c/json_tokener.c
    b0b627
    --- a/comm/third_party/json-c/json_tokener.c
    b0b627
    +++ b/comm/third_party/json-c/json_tokener.c
    b0b627
    @@ -8,18 +8,17 @@
    b0b627
      * it under the terms of the MIT license. See COPYING for details.
    b0b627
      *
    b0b627
      *
    b0b627
      * Copyright (c) 2008-2009 Yahoo! Inc.  All rights reserved.
    b0b627
      * The copyrights to the contents of this file are licensed under the MIT License
    b0b627
    - * (http://www.opensource.org/licenses/mit-license.php)
    b0b627
    + * (https://www.opensource.org/licenses/mit-license.php)
    b0b627
      */
    b0b627
     
    b0b627
     #include "config.h"
    b0b627
     
    b0b627
     #include "math_compat.h"
    b0b627
     #include <assert.h>
    b0b627
    -#include <ctype.h>
    b0b627
     #include <limits.h>
    b0b627
     #include <math.h>
    b0b627
     #include <stddef.h>
    b0b627
     #include <stdio.h>
    b0b627
     #include <stdlib.h>
    b0b627
    @@ -51,19 +50,48 @@
    b0b627
     #define strncasecmp _strnicmp
    b0b627
     #elif !HAVE_STRNCASECMP
    b0b627
     #error You do not have strncasecmp on your system.
    b0b627
     #endif /* HAVE_STRNCASECMP */
    b0b627
     
    b0b627
    +#if defined(_MSC_VER) && (_MSC_VER <= 1800)
    b0b627
    +/* VS2013 doesn't know about "inline" */
    b0b627
    +#define inline __inline
    b0b627
    +#elif defined(AIX_CC)
    b0b627
    +#define inline
    b0b627
    +#endif
    b0b627
    +
    b0b627
    +/* The following helper functions are used to speed up parsing. They
    b0b627
    + * are faster than their ctype counterparts because they assume that
    b0b627
    + * the input is in ASCII and that the locale is set to "C". The
    b0b627
    + * compiler will also inline these functions, providing an additional
    b0b627
    + * speedup by saving on function calls.
    b0b627
    + */
    b0b627
    +static inline int is_ws_char(char c)
    b0b627
    +{
    b0b627
    +	return c == ' '
    b0b627
    +	    || c == '\t'
    b0b627
    +	    || c == '\n'
    b0b627
    +	    || c == '\r';
    b0b627
    +}
    b0b627
    +
    b0b627
    +static inline int is_hex_char(char c)
    b0b627
    +{
    b0b627
    +	return (c >= '0' && c <= '9')
    b0b627
    +	    || (c >= 'A' && c <= 'F')
    b0b627
    +	    || (c >= 'a' && c <= 'f');
    b0b627
    +}
    b0b627
    +
    b0b627
     /* Use C99 NAN by default; if not available, nan("") should work too. */
    b0b627
     #ifndef NAN
    b0b627
     #define NAN nan("")
    b0b627
     #endif /* !NAN */
    b0b627
     
    b0b627
     static const char json_null_str[] = "null";
    b0b627
     static const int json_null_str_len = sizeof(json_null_str) - 1;
    b0b627
     static const char json_inf_str[] = "Infinity";
    b0b627
    -static const char json_inf_str_lower[] = "infinity";
    b0b627
    +/* Swapped case "Infinity" to avoid need to call tolower() on input chars: */
    b0b627
    +static const char json_inf_str_invert[] = "iNFINITY";
    b0b627
     static const unsigned int json_inf_str_len = sizeof(json_inf_str) - 1;
    b0b627
     static const char json_nan_str[] = "NaN";
    b0b627
     static const int json_nan_str_len = sizeof(json_nan_str) - 1;
    b0b627
     static const char json_true_str[] = "true";
    b0b627
     static const int json_true_str_len = sizeof(json_true_str) - 1;
    b0b627
    @@ -132,10 +160,16 @@ struct json_tokener *json_tokener_new_ex
    b0b627
     	{
    b0b627
     		free(tok);
    b0b627
     		return NULL;
    b0b627
     	}
    b0b627
     	tok->pb = printbuf_new();
    b0b627
    +	if (!tok->pb)
    b0b627
    +	{
    b0b627
    +		free(tok->stack);
    b0b627
    +		free(tok);
    b0b627
    +		return NULL;
    b0b627
    +	}
    b0b627
     	tok->max_depth = depth;
    b0b627
     	json_tokener_reset(tok);
    b0b627
     	return tok;
    b0b627
     }
    b0b627
     
    b0b627
    @@ -314,11 +348,11 @@ struct json_object *json_tokener_parse_e
    b0b627
     		switch (state)
    b0b627
     		{
    b0b627
     
    b0b627
     		case json_tokener_state_eatws:
    b0b627
     			/* Advance until we change state */
    b0b627
    -			while (isspace((unsigned char)c))
    b0b627
    +			while (is_ws_char(c))
    b0b627
     			{
    b0b627
     				if ((!ADVANCE_CHAR(str, tok)) || (!PEEK_CHAR(c, tok)))
    b0b627
     					goto out;
    b0b627
     			}
    b0b627
     			if (c == '/' && !(tok->flags & JSON_TOKENER_STRICT))
    b0b627
    @@ -419,21 +453,19 @@ struct json_object *json_tokener_parse_e
    b0b627
     			 * a character at a time.
    b0b627
     			 * Trying to handle it both ways would make this code considerably more
    b0b627
     			 * complicated with likely little performance benefit.
    b0b627
     			 */
    b0b627
     			int is_negative = 0;
    b0b627
    -			const char *_json_inf_str = json_inf_str;
    b0b627
    -			if (!(tok->flags & JSON_TOKENER_STRICT))
    b0b627
    -				_json_inf_str = json_inf_str_lower;
    b0b627
     
    b0b627
     			/* Note: tok->st_pos must be 0 when state is set to json_tokener_state_inf */
    b0b627
     			while (tok->st_pos < (int)json_inf_str_len)
    b0b627
     			{
    b0b627
     				char inf_char = *str;
    b0b627
    -				if (!(tok->flags & JSON_TOKENER_STRICT))
    b0b627
    -					inf_char = tolower((unsigned char)*str);
    b0b627
    -				if (inf_char != _json_inf_str[tok->st_pos])
    b0b627
    +				if (inf_char != json_inf_str[tok->st_pos] &&
    b0b627
    +				    ((tok->flags & JSON_TOKENER_STRICT) ||
    b0b627
    +				      inf_char != json_inf_str_invert[tok->st_pos])
    b0b627
    +				   )
    b0b627
     				{
    b0b627
     					tok->err = json_tokener_error_parse_unexpected;
    b0b627
     					goto out;
    b0b627
     				}
    b0b627
     				tok->st_pos++;
    b0b627
    @@ -645,11 +677,11 @@ struct json_object *json_tokener_parse_e
    b0b627
     		case json_tokener_state_escape_unicode:
    b0b627
     		{
    b0b627
     			/* Handle a 4-byte \uNNNN sequence, or two sequences if a surrogate pair */
    b0b627
     			while (1)
    b0b627
     			{
    b0b627
    -				if (!c || !strchr(json_hex_chars, c))
    b0b627
    +				if (!c || !is_hex_char(c))
    b0b627
     				{
    b0b627
     					tok->err = json_tokener_error_parse_string;
    b0b627
     					goto out;
    b0b627
     				}
    b0b627
     				tok->ucs_char |=
    b0b627
    @@ -712,11 +744,11 @@ struct json_object *json_tokener_parse_e
    b0b627
     				/*
    b0b627
     				 * The next two characters should be \u, HOWEVER,
    b0b627
     				 * we can't simply peek ahead here, because the
    b0b627
     				 * characters we need might not be passed to us
    b0b627
     				 * until a subsequent call to json_tokener_parse.
    b0b627
    -				 * Instead, transition throug a couple of states.
    b0b627
    +				 * Instead, transition through a couple of states.
    b0b627
     				 * (now):
    b0b627
     				 *   _escape_unicode => _unicode_need_escape
    b0b627
     				 * (see a '\\' char):
    b0b627
     				 *   _unicode_need_escape => _unicode_need_u
    b0b627
     				 * (see a 'u' char):
    b0b627
    @@ -918,11 +950,11 @@ struct json_object *json_tokener_parse_e
    b0b627
     				However, if we're at the top-level, use the number as-is
    b0b627
     			    because c can be part of a new object to parse on the
    b0b627
     				next call to json_tokener_parse().
    b0b627
     			 */
    b0b627
     			if (tok->depth > 0 && c != ',' && c != ']' && c != '}' && c != '/' &&
    b0b627
    -			    c != 'I' && c != 'i' && !isspace((unsigned char)c))
    b0b627
    +			    c != 'I' && c != 'i' && !is_ws_char(c))
    b0b627
     			{
    b0b627
     				tok->err = json_tokener_error_parse_number;
    b0b627
     				goto out;
    b0b627
     			}
    b0b627
     			if (case_len > 0)
    b0b627
    diff --git a/comm/third_party/json-c/json_types.h b/comm/third_party/json-c/json_types.h
    b0b627
    --- a/comm/third_party/json-c/json_types.h
    b0b627
    +++ b/comm/third_party/json-c/json_types.h
    b0b627
    @@ -16,11 +16,11 @@
    b0b627
     #ifdef __cplusplus
    b0b627
     extern "C" {
    b0b627
     #endif
    b0b627
     
    b0b627
     #ifndef JSON_EXPORT
    b0b627
    -#if defined(_MSC_VER)
    b0b627
    +#if defined(_MSC_VER) && defined(JSON_C_DLL)
    b0b627
     #define JSON_EXPORT __declspec(dllexport)
    b0b627
     #else
    b0b627
     #define JSON_EXPORT extern
    b0b627
     #endif
    b0b627
     #endif
    b0b627
    diff --git a/comm/third_party/json-c/json_util.c b/comm/third_party/json-c/json_util.c
    b0b627
    --- a/comm/third_party/json-c/json_util.c
    b0b627
    +++ b/comm/third_party/json-c/json_util.c
    b0b627
    @@ -12,11 +12,10 @@
    b0b627
     #include "config.h"
    b0b627
     #undef realloc
    b0b627
     
    b0b627
     #include "strerror_override.h"
    b0b627
     
    b0b627
    -#include <ctype.h>
    b0b627
     #include <limits.h>
    b0b627
     #include <stdarg.h>
    b0b627
     #include <stddef.h>
    b0b627
     #include <stdio.h>
    b0b627
     #include <stdlib.h>
    b0b627
    @@ -90,21 +89,21 @@ struct json_object *json_object_from_fd_
    b0b627
     	int depth = JSON_TOKENER_DEFAULT_DEPTH;
    b0b627
     	json_tokener *tok;
    b0b627
     
    b0b627
     	if (!(pb = printbuf_new()))
    b0b627
     	{
    b0b627
    -		_json_c_set_last_err("json_object_from_file: printbuf_new failed\n");
    b0b627
    +		_json_c_set_last_err("json_object_from_fd_ex: printbuf_new failed\n");
    b0b627
     		return NULL;
    b0b627
     	}
    b0b627
     
    b0b627
     	if (in_depth != -1)
    b0b627
     		depth = in_depth;
    b0b627
     	tok = json_tokener_new_ex(depth);
    b0b627
     	if (!tok)
    b0b627
     	{
    b0b627
     		_json_c_set_last_err(
    b0b627
    -		    "json_object_from_fd: unable to allocate json_tokener(depth=%d): %s\n", depth,
    b0b627
    +		    "json_object_from_fd_ex: unable to allocate json_tokener(depth=%d): %s\n", depth,
    b0b627
     		    strerror(errno));
    b0b627
     		printbuf_free(pb);
    b0b627
     		return NULL;
    b0b627
     	}
    b0b627
     
    b0b627
    @@ -112,11 +111,11 @@ struct json_object *json_object_from_fd_
    b0b627
     	{
    b0b627
     		printbuf_memappend(pb, buf, ret);
    b0b627
     	}
    b0b627
     	if (ret < 0)
    b0b627
     	{
    b0b627
    -		_json_c_set_last_err("json_object_from_fd: error reading fd %d: %s\n", fd,
    b0b627
    +		_json_c_set_last_err("json_object_from_fd_ex: error reading fd %d: %s\n", fd,
    b0b627
     		                     strerror(errno));
    b0b627
     		json_tokener_free(tok);
    b0b627
     		printbuf_free(pb);
    b0b627
     		return NULL;
    b0b627
     	}
    b0b627
    @@ -136,12 +135,12 @@ struct json_object *json_object_from_fil
    b0b627
     	struct json_object *obj;
    b0b627
     	int fd;
    b0b627
     
    b0b627
     	if ((fd = open(filename, O_RDONLY)) < 0)
    b0b627
     	{
    b0b627
    -		_json_c_set_last_err("json_object_from_file: error opening file %s: %s\n", filename,
    b0b627
    -		                     strerror(errno));
    b0b627
    +		_json_c_set_last_err("json_object_from_file: error opening file %s: %s\n",
    b0b627
    +		                     filename, strerror(errno));
    b0b627
     		return NULL;
    b0b627
     	}
    b0b627
     	obj = json_object_from_fd(fd);
    b0b627
     	close(fd);
    b0b627
     	return obj;
    b0b627
    @@ -154,18 +153,18 @@ int json_object_to_file_ext(const char *
    b0b627
     	int fd, ret;
    b0b627
     	int saved_errno;
    b0b627
     
    b0b627
     	if (!obj)
    b0b627
     	{
    b0b627
    -		_json_c_set_last_err("json_object_to_file: object is null\n");
    b0b627
    +		_json_c_set_last_err("json_object_to_file_ext: object is null\n");
    b0b627
     		return -1;
    b0b627
     	}
    b0b627
     
    b0b627
     	if ((fd = open(filename, O_WRONLY | O_TRUNC | O_CREAT, 0644)) < 0)
    b0b627
     	{
    b0b627
    -		_json_c_set_last_err("json_object_to_file: error opening file %s: %s\n", filename,
    b0b627
    -		                     strerror(errno));
    b0b627
    +		_json_c_set_last_err("json_object_to_file_ext: error opening file %s: %s\n",
    b0b627
    +		                     filename, strerror(errno));
    b0b627
     		return -1;
    b0b627
     	}
    b0b627
     	ret = _json_object_to_fd(fd, obj, flags, filename);
    b0b627
     	saved_errno = errno;
    b0b627
     	close(fd);
    b0b627
    @@ -201,11 +200,11 @@ static int _json_object_to_fd(int fd, st
    b0b627
     	wpos = 0;
    b0b627
     	while (wpos < wsize)
    b0b627
     	{
    b0b627
     		if ((ret = write(fd, json_str + wpos, wsize - wpos)) < 0)
    b0b627
     		{
    b0b627
    -			_json_c_set_last_err("json_object_to_file: error writing file %s: %s\n",
    b0b627
    +			_json_c_set_last_err("json_object_to_fd: error writing file %s: %s\n",
    b0b627
     			                     filename, strerror(errno));
    b0b627
     			return -1;
    b0b627
     		}
    b0b627
     
    b0b627
     		/* because of the above check for ret < 0, we can safely cast and add */
    b0b627
    @@ -287,11 +286,11 @@ static const char *json_type_name[] = {
    b0b627
     const char *json_type_to_name(enum json_type o_type)
    b0b627
     {
    b0b627
     	int o_type_int = (int)o_type;
    b0b627
     	if (o_type_int < 0 || o_type_int >= (int)NELEM(json_type_name))
    b0b627
     	{
    b0b627
    -		_json_c_set_last_err("json_type_to_name: type %d is out of range [0,%d]\n", o_type,
    b0b627
    -		                     NELEM(json_type_name));
    b0b627
    +		_json_c_set_last_err("json_type_to_name: type %d is out of range [0,%u]\n", o_type,
    b0b627
    +		                     (unsigned)NELEM(json_type_name));
    b0b627
     		return NULL;
    b0b627
     	}
    b0b627
     	return json_type_name[o_type];
    b0b627
     }
    b0b627
    diff --git a/comm/third_party/json-c/linkhash.c b/comm/third_party/json-c/linkhash.c
    b0b627
    --- a/comm/third_party/json-c/linkhash.c
    b0b627
    +++ b/comm/third_party/json-c/linkhash.c
    b0b627
    @@ -63,13 +63,13 @@ int lh_ptr_equal(const void *k1, const v
    b0b627
     	return (k1 == k2);
    b0b627
     }
    b0b627
     
    b0b627
     /*
    b0b627
      * hashlittle from lookup3.c, by Bob Jenkins, May 2006, Public Domain.
    b0b627
    - * http://burtleburtle.net/bob/c/lookup3.c
    b0b627
    + * https://burtleburtle.net/bob/c/lookup3.c
    b0b627
      * minor modifications to make functions static so no symbols are exported
    b0b627
    - * minor mofifications to compile with -Werror
    b0b627
    + * minor modifications to compile with -Werror
    b0b627
      */
    b0b627
     
    b0b627
     /*
    b0b627
     -------------------------------------------------------------------------------
    b0b627
     lookup3.c, by Bob Jenkins, May 2006, Public Domain.
    b0b627
    @@ -79,11 +79,11 @@ hashword(), hashlittle(), hashlittle2(),
    b0b627
     are externally useful functions.  Routines to test the hash are included
    b0b627
     if SELF_TEST is defined.  You can use this free for any purpose.  It's in
    b0b627
     the public domain.  It has no warranty.
    b0b627
     
    b0b627
     You probably want to use hashlittle().  hashlittle() and hashbig()
    b0b627
    -hash byte arrays.  hashlittle() is is faster than hashbig() on
    b0b627
    +hash byte arrays.  hashlittle() is faster than hashbig() on
    b0b627
     little-endian machines.  Intel and AMD are little-endian machines.
    b0b627
     On second thought, you probably want hashlittle2(), which is identical to
    b0b627
     hashlittle() except it returns two 32-bit hashes for the price of one.
    b0b627
     You could implement hashbig2() if you wanted but I haven't bothered here.
    b0b627
     
    b0b627
    @@ -154,11 +154,11 @@ satisfy this are
    b0b627
         4  6  8 16 19  4
    b0b627
         9 15  3 18 27 15
    b0b627
        14  9  3  7 17  3
    b0b627
     Well, "9 15 3 18 27 15" didn't quite get 32 bits diffing
    b0b627
     for "differ" defined as + with a one-bit base and a two-bit delta.  I
    b0b627
    -used http://burtleburtle.net/bob/hash/avalanche.html to choose
    b0b627
    +used https://burtleburtle.net/bob/hash/avalanche.html to choose
    b0b627
     the operations, constants, and arrangements of the variables.
    b0b627
     
    b0b627
     This does not achieve avalanche.  There are input bits of (a,b,c)
    b0b627
     that fail to affect some output bits of (a,b,c), especially of a.  The
    b0b627
     most thoroughly mixed value is c, but it doesn't really even achieve
    b0b627
    @@ -283,13 +283,13 @@ static uint32_t hashlittle(const void *k
    b0b627
     		 * then masks off the part it's not allowed to read.  Because the
    b0b627
     		 * string is aligned, the masked-off tail is in the same word as the
    b0b627
     		 * rest of the string.  Every machine with memory protection I've seen
    b0b627
     		 * does it on word boundaries, so is OK with this.  But VALGRIND will
    b0b627
     		 * still catch it and complain.  The masking trick does make the hash
    b0b627
    -		 * noticably faster for short strings (like English words).
    b0b627
    +		 * noticeably faster for short strings (like English words).
    b0b627
     		 * AddressSanitizer is similarly picky about overrunning
    b0b627
    -		 * the buffer. (http://clang.llvm.org/docs/AddressSanitizer.html
    b0b627
    +		 * the buffer. (https://clang.llvm.org/docs/AddressSanitizer.html)
    b0b627
     		 */
    b0b627
     #ifdef VALGRIND
    b0b627
     #define PRECISE_MEMORY_ACCESS 1
    b0b627
     #elif defined(__SANITIZE_ADDRESS__) /* GCC's ASAN */
    b0b627
     #define PRECISE_MEMORY_ACCESS 1
    b0b627
    @@ -437,12 +437,12 @@ static uint32_t hashlittle(const void *k
    b0b627
     	final(a,b,c);
    b0b627
     	return c;
    b0b627
     }
    b0b627
     /* clang-format on */
    b0b627
     
    b0b627
    -/* a simple hash function similiar to what perl does for strings.
    b0b627
    - * for good results, the string should not be excessivly large.
    b0b627
    +/* a simple hash function similar to what perl does for strings.
    b0b627
    + * for good results, the string should not be excessively large.
    b0b627
      */
    b0b627
     static unsigned long lh_perllike_str_hash(const void *k)
    b0b627
     {
    b0b627
     	const char *rkey = (const char *)k;
    b0b627
     	unsigned hashval = 1;
    b0b627
    @@ -463,11 +463,11 @@ static unsigned long lh_char_hash(const 
    b0b627
     	static volatile RANDOM_SEED_TYPE random_seed = -1;
    b0b627
     
    b0b627
     	if (random_seed == -1)
    b0b627
     	{
    b0b627
     		RANDOM_SEED_TYPE seed;
    b0b627
    -		/* we can't use -1 as it is the unitialized sentinel */
    b0b627
    +		/* we can't use -1 as it is the uninitialized sentinel */
    b0b627
     		while ((seed = json_c_get_random_seed()) == -1) {}
    b0b627
     #if SIZEOF_INT == 8 && defined __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8
    b0b627
     #define USE_SYNC_COMPARE_AND_SWAP 1
    b0b627
     #endif
    b0b627
     #if SIZEOF_INT == 4 && defined __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4
    b0b627
    @@ -479,16 +479,16 @@ static unsigned long lh_char_hash(const 
    b0b627
     #if defined USE_SYNC_COMPARE_AND_SWAP
    b0b627
     		(void)__sync_val_compare_and_swap(&random_seed, -1, seed);
    b0b627
     #elif defined _MSC_VER || defined __MINGW32__
    b0b627
     		InterlockedCompareExchange(&random_seed, seed, -1);
    b0b627
     #else
    b0b627
    -		//#warning "racy random seed initializtion if used by multiple threads"
    b0b627
    +		//#warning "racy random seed initialization if used by multiple threads"
    b0b627
     		random_seed = seed; /* potentially racy */
    b0b627
     #endif
    b0b627
     	}
    b0b627
     
    b0b627
    -	return hashlittle((const char *)k, strlen((const char *)k), random_seed);
    b0b627
    +	return hashlittle((const char *)k, strlen((const char *)k), (uint32_t)random_seed);
    b0b627
     }
    b0b627
     
    b0b627
     int lh_char_equal(const void *k1, const void *k2)
    b0b627
     {
    b0b627
     	return (strcmp((const char *)k1, (const char *)k2) == 0);
    b0b627
    @@ -544,11 +544,11 @@ int lh_table_resize(struct lh_table *t, 
    b0b627
     	for (ent = t->head; ent != NULL; ent = ent->next)
    b0b627
     	{
    b0b627
     		unsigned long h = lh_get_hash(new_t, ent->k);
    b0b627
     		unsigned int opts = 0;
    b0b627
     		if (ent->k_is_constant)
    b0b627
    -			opts = JSON_C_OBJECT_KEY_IS_CONSTANT;
    b0b627
    +			opts = JSON_C_OBJECT_ADD_CONSTANT_KEY;
    b0b627
     		if (lh_table_insert_w_hash(new_t, ent->k, ent->v, h, opts) != 0)
    b0b627
     		{
    b0b627
     			lh_table_free(new_t);
    b0b627
     			return -1;
    b0b627
     		}
    b0b627
    @@ -597,11 +597,11 @@ int lh_table_insert_w_hash(struct lh_tab
    b0b627
     		if ((int)++n == t->size)
    b0b627
     			n = 0;
    b0b627
     	}
    b0b627
     
    b0b627
     	t->table[n].k = k;
    b0b627
    -	t->table[n].k_is_constant = (opts & JSON_C_OBJECT_KEY_IS_CONSTANT);
    b0b627
    +	t->table[n].k_is_constant = (opts & JSON_C_OBJECT_ADD_CONSTANT_KEY);
    b0b627
     	t->table[n].v = v;
    b0b627
     	t->count++;
    b0b627
     
    b0b627
     	if (t->head == NULL)
    b0b627
     	{
    b0b627
    diff --git a/comm/third_party/json-c/linkhash.h b/comm/third_party/json-c/linkhash.h
    b0b627
    --- a/comm/third_party/json-c/linkhash.h
    b0b627
    +++ b/comm/third_party/json-c/linkhash.h
    b0b627
    @@ -14,12 +14,12 @@
    b0b627
      * @file
    b0b627
      * @brief Internal methods for working with json_type_object objects.  Although
    b0b627
      *        this is exposed by the json_object_get_object() function and within the
    b0b627
      *        json_object_iter type, it is not recommended for direct use.
    b0b627
      */
    b0b627
    -#ifndef _linkhash_h_
    b0b627
    -#define _linkhash_h_
    b0b627
    +#ifndef _json_c_linkhash_h_
    b0b627
    +#define _json_c_linkhash_h_
    b0b627
     
    b0b627
     #include "json_object.h"
    b0b627
     
    b0b627
     #ifdef __cplusplus
    b0b627
     extern "C" {
    b0b627
    @@ -78,86 +78,106 @@ typedef unsigned long(lh_hash_fn)(const 
    b0b627
      * callback function prototypes
    b0b627
      */
    b0b627
     typedef int(lh_equal_fn)(const void *k1, const void *k2);
    b0b627
     
    b0b627
     /**
    b0b627
    - * An entry in the hash table
    b0b627
    + * An entry in the hash table.  Outside of linkhash.c, treat this as opaque.
    b0b627
      */
    b0b627
     struct lh_entry
    b0b627
     {
    b0b627
     	/**
    b0b627
    -	 * The key.  Use lh_entry_k() instead of accessing this directly.
    b0b627
    +	 * The key.
    b0b627
    +	 * @deprecated Use lh_entry_k() instead of accessing this directly.
    b0b627
     	 */
    b0b627
     	const void *k;
    b0b627
     	/**
    b0b627
     	 * A flag for users of linkhash to know whether or not they
    b0b627
     	 * need to free k.
    b0b627
    +	 * @deprecated use lh_entry_k_is_constant() instead.
    b0b627
     	 */
    b0b627
     	int k_is_constant;
    b0b627
     	/**
    b0b627
    -	 * The value.  Use lh_entry_v() instead of accessing this directly.
    b0b627
    +	 * The value.
    b0b627
    +	 * @deprecated Use lh_entry_v() instead of accessing this directly.
    b0b627
     	 */
    b0b627
     	const void *v;
    b0b627
     	/**
    b0b627
    -	 * The next entry
    b0b627
    +	 * The next entry.
    b0b627
    +	 * @deprecated Use lh_entry_next() instead of accessing this directly.
    b0b627
     	 */
    b0b627
     	struct lh_entry *next;
    b0b627
     	/**
    b0b627
     	 * The previous entry.
    b0b627
    +	 * @deprecated Use lh_entry_prev() instead of accessing this directly.
    b0b627
     	 */
    b0b627
     	struct lh_entry *prev;
    b0b627
     };
    b0b627
     
    b0b627
     /**
    b0b627
    - * The hash table structure.
    b0b627
    + * The hash table structure.  Outside of linkhash.c, treat this as opaque.
    b0b627
      */
    b0b627
     struct lh_table
    b0b627
     {
    b0b627
     	/**
    b0b627
     	 * Size of our hash.
    b0b627
    +	 * @deprecated do not use outside of linkhash.c
    b0b627
     	 */
    b0b627
     	int size;
    b0b627
     	/**
    b0b627
     	 * Numbers of entries.
    b0b627
    +	 * @deprecated Use lh_table_length() instead.
    b0b627
     	 */
    b0b627
     	int count;
    b0b627
     
    b0b627
     	/**
    b0b627
     	 * The first entry.
    b0b627
    +	 * @deprecated Use lh_table_head() instead.
    b0b627
     	 */
    b0b627
     	struct lh_entry *head;
    b0b627
     
    b0b627
     	/**
    b0b627
     	 * The last entry.
    b0b627
    +	 * @deprecated Do not use, may be removed in a future release.
    b0b627
     	 */
    b0b627
     	struct lh_entry *tail;
    b0b627
     
    b0b627
    +	/**
    b0b627
    +	 * Internal storage of the actual table of entries.
    b0b627
    +	 * @deprecated do not use outside of linkhash.c
    b0b627
    +	 */
    b0b627
     	struct lh_entry *table;
    b0b627
     
    b0b627
     	/**
    b0b627
    -	 * A pointer onto the function responsible for freeing an entry.
    b0b627
    +	 * A pointer to the function responsible for freeing an entry.
    b0b627
    +	 * @deprecated do not use outside of linkhash.c
    b0b627
     	 */
    b0b627
     	lh_entry_free_fn *free_fn;
    b0b627
    +	/**
    b0b627
    +	 * @deprecated do not use outside of linkhash.c
    b0b627
    +	 */
    b0b627
     	lh_hash_fn *hash_fn;
    b0b627
    +	/**
    b0b627
    +	 * @deprecated do not use outside of linkhash.c
    b0b627
    +	 */
    b0b627
     	lh_equal_fn *equal_fn;
    b0b627
     };
    b0b627
     typedef struct lh_table lh_table;
    b0b627
     
    b0b627
     /**
    b0b627
      * Convenience list iterator.
    b0b627
      */
    b0b627
    -#define lh_foreach(table, entry) for (entry = table->head; entry; entry = entry->next)
    b0b627
    +#define lh_foreach(table, entry) for (entry = lh_table_head(table); entry; entry = lh_entry_next(entry))
    b0b627
     
    b0b627
     /**
    b0b627
      * lh_foreach_safe allows calling of deletion routine while iterating.
    b0b627
      *
    b0b627
      * @param table a struct lh_table * to iterate over
    b0b627
      * @param entry a struct lh_entry * variable to hold each element
    b0b627
      * @param tmp a struct lh_entry * variable to hold a temporary pointer to the next element
    b0b627
      */
    b0b627
     #define lh_foreach_safe(table, entry, tmp) \
    b0b627
    -	for (entry = table->head; entry && ((tmp = entry->next) || 1); entry = tmp)
    b0b627
    +	for (entry = lh_table_head(table); entry && ((tmp = lh_entry_next(entry)) || 1); entry = tmp)
    b0b627
     
    b0b627
     /**
    b0b627
      * Create a new linkhash table.
    b0b627
      *
    b0b627
      * @param size initial table size. The table is automatically resized
    b0b627
    @@ -229,11 +249,11 @@ extern int lh_table_insert(struct lh_tab
    b0b627
      *
    b0b627
      * @param t the table to insert into.
    b0b627
      * @param k a pointer to the key to insert.
    b0b627
      * @param v a pointer to the value to insert.
    b0b627
      * @param h hash value of the key to insert
    b0b627
    - * @param opts if set to JSON_C_OBJECT_KEY_IS_CONSTANT, sets lh_entry.k_is_constant
    b0b627
    + * @param opts if set to JSON_C_OBJECT_ADD_CONSTANT_KEY, sets lh_entry.k_is_constant
    b0b627
      *             so t's free function knows to avoid freeing the key.
    b0b627
      */
    b0b627
     extern int lh_table_insert_w_hash(struct lh_table *t, const void *k, const void *v,
    b0b627
                                       const unsigned long h, const unsigned opts);
    b0b627
     
    b0b627
    @@ -293,10 +313,13 @@ extern int lh_table_delete_entry(struct 
    b0b627
      * @return 0 if the item was deleted.
    b0b627
      * @return -1 if it was not found.
    b0b627
      */
    b0b627
     extern int lh_table_delete(struct lh_table *t, const void *k);
    b0b627
     
    b0b627
    +/**
    b0b627
    + * Return the number of entries in the table.
    b0b627
    + */
    b0b627
     extern int lh_table_length(struct lh_table *t);
    b0b627
     
    b0b627
     /**
    b0b627
      * Resizes the specified table.
    b0b627
      *
    b0b627
    @@ -317,13 +340,22 @@ int lh_table_resize(struct lh_table *t, 
    b0b627
     #else
    b0b627
     #define _LH_INLINE inline
    b0b627
     #endif
    b0b627
     
    b0b627
     /**
    b0b627
    + * Return the first entry in the lh_table.
    b0b627
    + * @see lh_entry_next()
    b0b627
    + */
    b0b627
    +static _LH_INLINE struct lh_entry *lh_table_head(const lh_table *t)
    b0b627
    +{
    b0b627
    +	return t->head;
    b0b627
    +}
    b0b627
    +
    b0b627
    +/**
    b0b627
      * Calculate the hash of a key for a given table.
    b0b627
      *
    b0b627
    - * This is an exension to support functions that need to calculate
    b0b627
    + * This is an extension to support functions that need to calculate
    b0b627
      * the hash several times and allows them to do it just once and then pass
    b0b627
      * in the hash to all utility functions. Depending on use case, this can be a
    b0b627
      * considerable performance improvement.
    b0b627
      * @param t the table (used to obtain hash function)
    b0b627
      * @param k a pointer to the key to lookup
    b0b627
    @@ -332,11 +364,10 @@ int lh_table_resize(struct lh_table *t, 
    b0b627
     static _LH_INLINE unsigned long lh_get_hash(const struct lh_table *t, const void *k)
    b0b627
     {
    b0b627
     	return t->hash_fn(k);
    b0b627
     }
    b0b627
     
    b0b627
    -#undef _LH_INLINE
    b0b627
     
    b0b627
     /**
    b0b627
      * @deprecated Don't use this outside of linkhash.h:
    b0b627
      */
    b0b627
     #ifdef __UNCONST
    b0b627
    @@ -348,21 +379,68 @@ static _LH_INLINE unsigned long lh_get_h
    b0b627
     /**
    b0b627
      * Return a non-const version of lh_entry.k.
    b0b627
      *
    b0b627
      * lh_entry.k is const to indicate and help ensure that linkhash itself doesn't modify
    b0b627
      * it, but callers are allowed to do what they want with it.
    b0b627
    - * See also lh_entry.k_is_constant
    b0b627
    + * @see lh_entry_k_is_constant()
    b0b627
      */
    b0b627
    -#define lh_entry_k(entry) _LH_UNCONST((entry)->k)
    b0b627
    +static _LH_INLINE void *lh_entry_k(const struct lh_entry *e)
    b0b627
    +{
    b0b627
    +	return _LH_UNCONST(e->k);
    b0b627
    +}
    b0b627
    +
    b0b627
    +/**
    b0b627
    + * Returns 1 if the key for the given entry is constant, and thus
    b0b627
    + *  does not need to be freed when the lh_entry is freed.
    b0b627
    + * @see lh_table_insert_w_hash()
    b0b627
    + */
    b0b627
    +static _LH_INLINE int lh_entry_k_is_constant(const struct lh_entry *e)
    b0b627
    +{
    b0b627
    +	return e->k_is_constant;
    b0b627
    +}
    b0b627
     
    b0b627
     /**
    b0b627
      * Return a non-const version of lh_entry.v.
    b0b627
      *
    b0b627
      * v is const to indicate and help ensure that linkhash itself doesn't modify
    b0b627
      * it, but callers are allowed to do what they want with it.
    b0b627
      */
    b0b627
    -#define lh_entry_v(entry) _LH_UNCONST((entry)->v)
    b0b627
    +static _LH_INLINE void *lh_entry_v(const struct lh_entry *e)
    b0b627
    +{
    b0b627
    +	return _LH_UNCONST(e->v);
    b0b627
    +}
    b0b627
    +
    b0b627
    +/**
    b0b627
    + * Change the value for an entry.  The caller is responsible for freeing
    b0b627
    + *  the previous value.
    b0b627
    + */
    b0b627
    +static _LH_INLINE void lh_entry_set_val(struct lh_entry *e, void *newval)
    b0b627
    +{
    b0b627
    +	e->v = newval;
    b0b627
    +}
    b0b627
    +
    b0b627
    +/**
    b0b627
    + * Return the next element, or NULL if there is no next element.
    b0b627
    + * @see lh_table_head()
    b0b627
    + * @see lh_entry_prev()
    b0b627
    + */
    b0b627
    +static _LH_INLINE struct lh_entry *lh_entry_next(const struct lh_entry *e)
    b0b627
    +{
    b0b627
    +	return e->next;
    b0b627
    +}
    b0b627
    +
    b0b627
    +/**
    b0b627
    + * Return the previous element, or NULL if there is no previous element.
    b0b627
    + * @see lh_table_head()
    b0b627
    + * @see lh_entry_next()
    b0b627
    + */
    b0b627
    +static _LH_INLINE struct lh_entry *lh_entry_prev(const struct lh_entry *e)
    b0b627
    +{
    b0b627
    +	return e->prev;
    b0b627
    +}
    b0b627
    +
    b0b627
    +#undef _LH_INLINE
    b0b627
     
    b0b627
     #ifdef __cplusplus
    b0b627
     }
    b0b627
     #endif
    b0b627
     
    b0b627
    diff --git a/comm/third_party/json-c/moz.build b/third_party/json-c/moz.b/commuild
    b0b627
    --- a/comm/third_party/json-c/moz.build
    b0b627
    +++ b/comm/third_party/json-c/moz.build
    b0b627
    @@ -21,10 +21,22 @@ else:
    b0b627
         DEFINES["_GNU_SOURCE"] = True
    b0b627
         DEFINES["CC"] = CONFIG["_CC"]
    b0b627
     
    b0b627
         CONFIGURE_DEFINE_FILES += ["config.h", "json_config.h"]
    b0b627
     
    b0b627
    +    GeneratedFile(
    b0b627
    +        "json.h",
    b0b627
    +        script="/python/mozbuild/mozbuild/action/preprocessor.py",
    b0b627
    +        entry_point="generate",
    b0b627
    +        inputs=["json.h.cmakein"],
    b0b627
    +        flags=[
    b0b627
    +            "--marker", "%",
    b0b627
    +            "-F", "substitution",
    b0b627
    +            "-DJSON_H_JSON_POINTER=#include \"json_pointer.h\""
    b0b627
    +        ]
    b0b627
    +    )
    b0b627
    +
    b0b627
         SOURCES += [
    b0b627
             "arraylist.c",
    b0b627
             "debug.c",
    b0b627
             "json_c_version.c",
    b0b627
             "json_object.c",
    b0b627
    diff --git a/comm/third_party/json-c/printbuf.c b/third_party/json-c/printb/commuf.c
    b0b627
    --- a/comm/third_party/json-c/printbuf.c
    b0b627
    +++ b/comm/third_party/json-c/printbuf.c
    b0b627
    @@ -8,11 +8,11 @@
    b0b627
      * it under the terms of the MIT license. See COPYING for details.
    b0b627
      *
    b0b627
      *
    b0b627
      * Copyright (c) 2008-2009 Yahoo! Inc.  All rights reserved.
    b0b627
      * The copyrights to the contents of this file are licensed under the MIT License
    b0b627
    - * (http://www.opensource.org/licenses/mit-license.php)
    b0b627
    + * (https://www.opensource.org/licenses/mit-license.php)
    b0b627
      */
    b0b627
     
    b0b627
     #include "config.h"
    b0b627
     
    b0b627
     #include <limits.h>
    b0b627
    @@ -89,11 +89,11 @@ static int printbuf_extend(struct printb
    b0b627
     }
    b0b627
     
    b0b627
     int printbuf_memappend(struct printbuf *p, const char *buf, int size)
    b0b627
     {
    b0b627
     	/* Prevent signed integer overflows with large buffers. */
    b0b627
    -	if (size > INT_MAX - p->bpos - 1)
    b0b627
    +	if (size < 0 || size > INT_MAX - p->bpos - 1)
    b0b627
     		return -1;
    b0b627
     	if (p->size <= p->bpos + size + 1)
    b0b627
     	{
    b0b627
     		if (printbuf_extend(p, p->bpos + size + 1) < 0)
    b0b627
     			return -1;
    b0b627
    @@ -109,19 +109,21 @@ int printbuf_memset(struct printbuf *pb,
    b0b627
     	int size_needed;
    b0b627
     
    b0b627
     	if (offset == -1)
    b0b627
     		offset = pb->bpos;
    b0b627
     	/* Prevent signed integer overflows with large buffers. */
    b0b627
    -	if (len > INT_MAX - offset)
    b0b627
    +	if (len < 0 || offset < -1 || len > INT_MAX - offset)
    b0b627
     		return -1;
    b0b627
     	size_needed = offset + len;
    b0b627
     	if (pb->size < size_needed)
    b0b627
     	{
    b0b627
     		if (printbuf_extend(pb, size_needed) < 0)
    b0b627
     			return -1;
    b0b627
     	}
    b0b627
     
    b0b627
    +	if (pb->bpos < offset)
    b0b627
    +		memset(pb->buf + pb->bpos, '\0', offset - pb->bpos);
    b0b627
     	memset(pb->buf + offset, charvalue, len);
    b0b627
     	if (pb->bpos < size_needed)
    b0b627
     		pb->bpos = size_needed;
    b0b627
     
    b0b627
     	return 0;
    b0b627
    @@ -132,37 +134,36 @@ int sprintbuf(struct printbuf *p, const 
    b0b627
     	va_list ap;
    b0b627
     	char *t;
    b0b627
     	int size;
    b0b627
     	char buf[128];
    b0b627
     
    b0b627
    -	/* user stack buffer first */
    b0b627
    +	/* use stack buffer first */
    b0b627
     	va_start(ap, msg);
    b0b627
     	size = vsnprintf(buf, 128, msg, ap);
    b0b627
     	va_end(ap);
    b0b627
     	/* if string is greater than stack buffer, then use dynamic string
    b0b627
    -	 * with vasprintf.  Note: some implementation of vsnprintf return -1
    b0b627
    +	 * with vasprintf.  Note: some implementations of vsnprintf return -1
    b0b627
     	 * if output is truncated whereas some return the number of bytes that
    b0b627
     	 * would have been written - this code handles both cases.
    b0b627
     	 */
    b0b627
    -	if (size == -1 || size > 127)
    b0b627
    +	if (size < 0 || size > 127)
    b0b627
     	{
    b0b627
     		va_start(ap, msg);
    b0b627
     		if ((size = vasprintf(&t, msg, ap)) < 0)
    b0b627
     		{
    b0b627
     			va_end(ap);
    b0b627
     			return -1;
    b0b627
     		}
    b0b627
     		va_end(ap);
    b0b627
    -		printbuf_memappend(p, t, size);
    b0b627
    +		size = printbuf_memappend(p, t, size);
    b0b627
     		free(t);
    b0b627
    -		return size;
    b0b627
     	}
    b0b627
     	else
    b0b627
     	{
    b0b627
    -		printbuf_memappend(p, buf, size);
    b0b627
    -		return size;
    b0b627
    +		size = printbuf_memappend(p, buf, size);
    b0b627
     	}
    b0b627
    +	return size;
    b0b627
     }
    b0b627
     
    b0b627
     void printbuf_reset(struct printbuf *p)
    b0b627
     {
    b0b627
     	p->buf[0] = '\0';
    b0b627
    diff --git a/comm/third_party/json-c/printbuf.h b/third_party/json-c/printb/commuf.h
    b0b627
    --- a/comm/third_party/json-c/printbuf.h
    b0b627
    +++ b/comm/third_party/json-c/printbuf.h
    b0b627
    @@ -8,25 +8,25 @@
    b0b627
      * it under the terms of the MIT license. See COPYING for details.
    b0b627
      *
    b0b627
      *
    b0b627
      * Copyright (c) 2008-2009 Yahoo! Inc.  All rights reserved.
    b0b627
      * The copyrights to the contents of this file are licensed under the MIT License
    b0b627
    - * (http://www.opensource.org/licenses/mit-license.php)
    b0b627
    + * (https://www.opensource.org/licenses/mit-license.php)
    b0b627
      */
    b0b627
     
    b0b627
     /**
    b0b627
      * @file
    b0b627
    - * @brief Internal string buffer handing.  Unless you're writing a
    b0b627
    + * @brief Internal string buffer handling.  Unless you're writing a
    b0b627
      *        json_object_to_json_string_fn implementation for use with
    b0b627
      *        json_object_set_serializer() direct use of this is not
    b0b627
      *        recommended.
    b0b627
      */
    b0b627
    -#ifndef _printbuf_h_
    b0b627
    -#define _printbuf_h_
    b0b627
    +#ifndef _json_c_printbuf_h_
    b0b627
    +#define _json_c_printbuf_h_
    b0b627
     
    b0b627
     #ifndef JSON_EXPORT
    b0b627
    -#if defined(_MSC_VER)
    b0b627
    +#if defined(_MSC_VER) && defined(JSON_C_DLL)
    b0b627
     #define JSON_EXPORT __declspec(dllexport)
    b0b627
     #else
    b0b627
     #define JSON_EXPORT extern
    b0b627
     #endif
    b0b627
     #endif
    b0b627
    diff --git a/comm/third_party/json-c/random_seed.c b/comm/third_party/json-c/random_seed.c
    b0b627
    --- a/comm/third_party/json-c/random_seed.c
    b0b627
    +++ b/comm/third_party/json-c/random_seed.c
    b0b627
    @@ -11,13 +11,27 @@
    b0b627
     
    b0b627
     #include "random_seed.h"
    b0b627
     #include "config.h"
    b0b627
     #include "strerror_override.h"
    b0b627
     #include <stdio.h>
    b0b627
    +#include <stdlib.h>
    b0b627
    +#ifdef HAVE_BSD_STDLIB_H
    b0b627
    +#include <bsd/stdlib.h>
    b0b627
    +#endif
    b0b627
     
    b0b627
     #define DEBUG_SEED(s)
    b0b627
     
    b0b627
    +#if defined(__APPLE__) || defined(__unix__) || defined(__linux__)
    b0b627
    +#define HAVE_DEV_RANDOM 1
    b0b627
    +#endif
    b0b627
    +
    b0b627
    +#ifdef HAVE_ARC4RANDOM
    b0b627
    +#undef HAVE_GETRANDOM
    b0b627
    +#undef HAVE_DEV_RANDOM
    b0b627
    +#undef HAVE_CRYPTGENRANDOM
    b0b627
    +#endif
    b0b627
    +
    b0b627
     #if defined ENABLE_RDRAND
    b0b627
     
    b0b627
     /* cpuid */
    b0b627
     
    b0b627
     #if defined __GNUC__ && (defined __i386__ || defined __x86_64__)
    b0b627
    @@ -153,59 +167,88 @@ retry:
    b0b627
     #endif
    b0b627
     #endif
    b0b627
     
    b0b627
     #endif /* defined ENABLE_RDRAND */
    b0b627
     
    b0b627
    -/* has_dev_urandom */
    b0b627
    +#ifdef HAVE_GETRANDOM
    b0b627
    +
    b0b627
    +#include <stdlib.h>
    b0b627
    +#ifdef HAVE_SYS_RANDOM_H
    b0b627
    +#include <sys/random.h>
    b0b627
    +#endif
    b0b627
    +
    b0b627
    +static int get_getrandom_seed(int *seed)
    b0b627
    +{
    b0b627
    +	DEBUG_SEED("get_getrandom_seed");
    b0b627
    +
    b0b627
    +	ssize_t ret;
    b0b627
    +
    b0b627
    +	do
    b0b627
    +	{
    b0b627
    +		ret = getrandom(seed, sizeof(*seed), GRND_NONBLOCK);
    b0b627
    +	} while ((ret == -1) && (errno == EINTR));
    b0b627
     
    b0b627
    -#if defined(__APPLE__) || defined(__unix__) || defined(__linux__)
    b0b627
    +	if (ret == -1)
    b0b627
    +	{
    b0b627
    +		if (errno == ENOSYS) /* syscall not available in kernel */
    b0b627
    +			return -1;
    b0b627
    +		if (errno == EAGAIN) /* entropy not yet initialized */
    b0b627
    +			return -1;
    b0b627
    +
    b0b627
    +		fprintf(stderr, "error from getrandom(): %s", strerror(errno));
    b0b627
    +		return -1;
    b0b627
    +	}
    b0b627
    +
    b0b627
    +	if (ret != sizeof(*seed))
    b0b627
    +		return -1;
    b0b627
    +
    b0b627
    +	return 0;
    b0b627
    +}
    b0b627
    +#endif /* defined HAVE_GETRANDOM */
    b0b627
    +
    b0b627
    +/* get_dev_random_seed */
    b0b627
    +
    b0b627
    +#ifdef HAVE_DEV_RANDOM
    b0b627
     
    b0b627
     #include <fcntl.h>
    b0b627
     #include <string.h>
    b0b627
     #if HAVE_UNISTD_H
    b0b627
     #include <unistd.h>
    b0b627
     #endif /* HAVE_UNISTD_H */
    b0b627
     #include <stdlib.h>
    b0b627
     #include <sys/stat.h>
    b0b627
     
    b0b627
    -#define HAVE_DEV_RANDOM 1
    b0b627
    -
    b0b627
     static const char *dev_random_file = "/dev/urandom";
    b0b627
     
    b0b627
    -static int has_dev_urandom(void)
    b0b627
    +static int get_dev_random_seed(int *seed)
    b0b627
     {
    b0b627
    +	DEBUG_SEED("get_dev_random_seed");
    b0b627
    +
    b0b627
     	struct stat buf;
    b0b627
     	if (stat(dev_random_file, &buf))
    b0b627
    -	{
    b0b627
    -		return 0;
    b0b627
    -	}
    b0b627
    -	return ((buf.st_mode & S_IFCHR) != 0);
    b0b627
    -}
    b0b627
    -
    b0b627
    -/* get_dev_random_seed */
    b0b627
    -
    b0b627
    -static int get_dev_random_seed(void)
    b0b627
    -{
    b0b627
    -	DEBUG_SEED("get_dev_random_seed");
    b0b627
    +		return -1;
    b0b627
    +	if ((buf.st_mode & S_IFCHR) == 0)
    b0b627
    +		return -1;
    b0b627
     
    b0b627
     	int fd = open(dev_random_file, O_RDONLY);
    b0b627
     	if (fd < 0)
    b0b627
     	{
    b0b627
     		fprintf(stderr, "error opening %s: %s", dev_random_file, strerror(errno));
    b0b627
    -		exit(1);
    b0b627
    +		return -1;
    b0b627
     	}
    b0b627
     
    b0b627
    -	int r;
    b0b627
    -	ssize_t nread = read(fd, &r, sizeof(r));
    b0b627
    -	if (nread != sizeof(r))
    b0b627
    +	ssize_t nread = read(fd, seed, sizeof(*seed));
    b0b627
    +
    b0b627
    +	close(fd);
    b0b627
    +
    b0b627
    +	if (nread != sizeof(*seed))
    b0b627
     	{
    b0b627
     		fprintf(stderr, "error short read %s: %s", dev_random_file, strerror(errno));
    b0b627
    -		exit(1);
    b0b627
    +		return -1;
    b0b627
     	}
    b0b627
     
    b0b627
    -	close(fd);
    b0b627
    -	return r;
    b0b627
    +	return 0;
    b0b627
     }
    b0b627
     
    b0b627
     #endif
    b0b627
     
    b0b627
     /* get_cryptgenrandom_seed */
    b0b627
    @@ -224,55 +267,54 @@ static int get_dev_random_seed(void)
    b0b627
     /* clang-format on */
    b0b627
     #ifndef __GNUC__
    b0b627
     #pragma comment(lib, "advapi32.lib")
    b0b627
     #endif
    b0b627
     
    b0b627
    -static int get_time_seed(void);
    b0b627
    -
    b0b627
    -static int get_cryptgenrandom_seed(void)
    b0b627
    +static int get_cryptgenrandom_seed(int *seed)
    b0b627
     {
    b0b627
     	HCRYPTPROV hProvider = 0;
    b0b627
     	DWORD dwFlags = CRYPT_VERIFYCONTEXT;
    b0b627
    -	int r;
    b0b627
     
    b0b627
     	DEBUG_SEED("get_cryptgenrandom_seed");
    b0b627
     
    b0b627
     	/* WinNT 4 and Win98 do no support CRYPT_SILENT */
    b0b627
     	if (LOBYTE(LOWORD(GetVersion())) > 4)
    b0b627
     		dwFlags |= CRYPT_SILENT;
    b0b627
     
    b0b627
     	if (!CryptAcquireContextA(&hProvider, 0, 0, PROV_RSA_FULL, dwFlags))
    b0b627
     	{
    b0b627
     		fprintf(stderr, "error CryptAcquireContextA 0x%08lx", GetLastError());
    b0b627
    -		r = get_time_seed();
    b0b627
    +		return -1;
    b0b627
     	}
    b0b627
     	else
    b0b627
     	{
    b0b627
    -		BOOL ret = CryptGenRandom(hProvider, sizeof(r), (BYTE*)&r);
    b0b627
    +		BOOL ret = CryptGenRandom(hProvider, sizeof(*seed), (BYTE *)seed);
    b0b627
     		CryptReleaseContext(hProvider, 0);
    b0b627
     		if (!ret)
    b0b627
     		{
    b0b627
     			fprintf(stderr, "error CryptGenRandom 0x%08lx", GetLastError());
    b0b627
    -			r = get_time_seed();
    b0b627
    +			return -1;
    b0b627
     		}
    b0b627
     	}
    b0b627
     
    b0b627
    -	return r;
    b0b627
    +	return 0;
    b0b627
     }
    b0b627
     
    b0b627
     #endif
    b0b627
     
    b0b627
     /* get_time_seed */
    b0b627
     
    b0b627
    +#ifndef HAVE_ARC4RANDOM
    b0b627
     #include <time.h>
    b0b627
     
    b0b627
     static int get_time_seed(void)
    b0b627
     {
    b0b627
     	DEBUG_SEED("get_time_seed");
    b0b627
     
    b0b627
    -	return (int)time(NULL) * 433494437;
    b0b627
    +	return (unsigned)time(NULL) * 433494437;
    b0b627
     }
    b0b627
    +#endif
    b0b627
     
    b0b627
     /* json_c_get_random_seed */
    b0b627
     
    b0b627
     int json_c_get_random_seed(void)
    b0b627
     {
    b0b627
    @@ -281,14 +323,33 @@ int json_c_get_random_seed(void)
    b0b627
     #endif
    b0b627
     #if defined HAVE_RDRAND && HAVE_RDRAND
    b0b627
     	if (has_rdrand())
    b0b627
     		return get_rdrand_seed();
    b0b627
     #endif
    b0b627
    +#ifdef HAVE_ARC4RANDOM
    b0b627
    +	/* arc4random never fails, so use it if it's available */
    b0b627
    +	return arc4random();
    b0b627
    +#else
    b0b627
    +#ifdef HAVE_GETRANDOM
    b0b627
    +	{
    b0b627
    +		int seed = 0;
    b0b627
    +		if (get_getrandom_seed(&seed) == 0)
    b0b627
    +			return seed;
    b0b627
    +	}
    b0b627
    +#endif
    b0b627
     #if defined HAVE_DEV_RANDOM && HAVE_DEV_RANDOM
    b0b627
    -	if (has_dev_urandom())
    b0b627
    -		return get_dev_random_seed();
    b0b627
    +	{
    b0b627
    +		int seed = 0;
    b0b627
    +		if (get_dev_random_seed(&seed) == 0)
    b0b627
    +			return seed;
    b0b627
    +	}
    b0b627
     #endif
    b0b627
     #if defined HAVE_CRYPTGENRANDOM && HAVE_CRYPTGENRANDOM
    b0b627
    -	return get_cryptgenrandom_seed();
    b0b627
    +	{
    b0b627
    +		int seed = 0;
    b0b627
    +		if (get_cryptgenrandom_seed(&seed) == 0)
    b0b627
    +			return seed;
    b0b627
    +	}
    b0b627
     #endif
    b0b627
     	return get_time_seed();
    b0b627
    +#endif /* !HAVE_ARC4RANDOM */
    b0b627
     }
    b0b627
    diff --git a/comm/third_party/json-c/strerror_override.c b/comm/third_party/json-c/strerror_override.c
    b0b627
    --- a/comm/third_party/json-c/strerror_override.c
    b0b627
    +++ b/comm/third_party/json-c/strerror_override.c
    b0b627
    @@ -92,18 +92,19 @@ char *_json_c_strerror(int errno_in)
    b0b627
     		errno_buf[start_idx] = '\0';
    b0b627
     		return errno_buf;
    b0b627
     	}
    b0b627
     
    b0b627
     	// It's not one of the known errno values, return the numeric value.
    b0b627
    -	for (ii = 0; errno_in > 10; errno_in /= 10, ii++)
    b0b627
    +	for (ii = 0; errno_in >= 10; errno_in /= 10, ii++)
    b0b627
     	{
    b0b627
     		digbuf[ii] = "0123456789"[(errno_in % 10)];
    b0b627
     	}
    b0b627
     	digbuf[ii] = "0123456789"[(errno_in % 10)];
    b0b627
     
    b0b627
     	// Reverse the digits
    b0b627
     	for (start_idx = sizeof(PREFIX) - 1; ii >= 0; ii--, start_idx++)
    b0b627
     	{
    b0b627
     		errno_buf[start_idx] = digbuf[ii];
    b0b627
     	}
    b0b627
    +	errno_buf[start_idx] = '\0';
    b0b627
     	return errno_buf;
    b0b627
     }
    b0b627
    diff --git a/comm/third_party/json-c/vasprintf_compat.h b/comm/third_party/json-c/vasprintf_compat.h
    b0b627
    --- a/comm/third_party/json-c/vasprintf_compat.h
    b0b627
    +++ b/comm/third_party/json-c/vasprintf_compat.h
    b0b627
    @@ -6,41 +6,48 @@
    b0b627
      * @brief Do not use, json-c internal, may be changed or removed at any time.
    b0b627
      */
    b0b627
     
    b0b627
     #include "snprintf_compat.h"
    b0b627
     
    b0b627
    +#ifndef WIN32
    b0b627
    +#include <stdarg.h>
    b0b627
    +#endif /* !defined(WIN32) */
    b0b627
    +#include <stdint.h>
    b0b627
     #include <stdlib.h>
    b0b627
     
    b0b627
     #if !defined(HAVE_VASPRINTF)
    b0b627
     /* CAW: compliant version of vasprintf */
    b0b627
     static int vasprintf(char **buf, const char *fmt, va_list ap)
    b0b627
     {
    b0b627
     #ifndef WIN32
    b0b627
     	static char _T_emptybuffer = '\0';
    b0b627
    +	va_list ap2;
    b0b627
     #endif /* !defined(WIN32) */
    b0b627
     	int chars;
    b0b627
     	char *b;
    b0b627
     
    b0b627
     	if (!buf)
    b0b627
     	{
    b0b627
     		return -1;
    b0b627
     	}
    b0b627
     
    b0b627
     #ifdef WIN32
    b0b627
    -	chars = _vscprintf(fmt, ap) + 1;
    b0b627
    +	chars = _vscprintf(fmt, ap);
    b0b627
     #else  /* !defined(WIN32) */
    b0b627
     	/* CAW: RAWR! We have to hope to god here that vsnprintf doesn't overwrite
    b0b627
    -	 * our buffer like on some 64bit sun systems.... but hey, its time to move on
    b0b627
    +	 * our buffer like on some 64bit sun systems... but hey, it's time to move on
    b0b627
     	 */
    b0b627
    -	chars = vsnprintf(&_T_emptybuffer, 0, fmt, ap) + 1;
    b0b627
    -	if (chars < 0)
    b0b627
    +	va_copy(ap2, ap);
    b0b627
    +	chars = vsnprintf(&_T_emptybuffer, 0, fmt, ap2);
    b0b627
    +	va_end(ap2);
    b0b627
    +#endif /* defined(WIN32) */
    b0b627
    +	if (chars < 0 || (size_t)chars + 1 > SIZE_MAX / sizeof(char))
    b0b627
     	{
    b0b627
    -		chars *= -1;
    b0b627
    -	} /* CAW: old glibc versions have this problem */
    b0b627
    -#endif /* defined(WIN32) */
    b0b627
    +		return -1;
    b0b627
    +	}
    b0b627
     
    b0b627
    -	b = (char *)malloc(sizeof(char) * chars);
    b0b627
    +	b = (char *)malloc(sizeof(char) * ((size_t)chars + 1));
    b0b627
     	if (!b)
    b0b627
     	{
    b0b627
     		return -1;
    b0b627
     	}
    b0b627