1. Feb 09, 2018
  2. Dec 17, 2017
  3. Dec 14, 2017
    • Corey Farrell's avatar
      apiref: Clarify documentation for unpack `O` format. · 6c789100
      Corey Farrell authored
      The `O` format causes reference counts to increase, but in an error they
      are not released.  Callers to unpack functions that use the `O` format
      should use pointers pre-initialized to NULL so they can safely release
      the reference on error.
      
      Also corrected typo which said this was like `O` (itself).
      
      Fixes #135
      6c789100
    • Corey Farrell's avatar
      json_object_iter_set_new: Fix error branch leak. · 89dad895
      Corey Farrell authored
      This function needs to release a reference to value if the other
      arguments are invalid.
      
      Issue #135
      89dad895
    • Corey Farrell's avatar
      json_pack: Enable more complete stealing of references. · 9a1d9c88
      Corey Farrell authored
      Users of the "o" format have an expectation that the object reference
      will be stolen.  Any error causes the collection process to end early.
      This patch causes json_pack and related functions to continue scanning
      the format and parameters so all references can be stolen to prevent
      leaks.  This makes no attempt to continue processing if the format
      string is broken or missing.
      
      'make check' still passes.  Ran test_pack under valgrind and verified
      that the leaked reference is fixed. Added a test which uses refcounts
      to verify that the reference was correctly stolen after a NULL value
      error.
      
      Issue #135
      9a1d9c88
  4. Dec 13, 2017
  5. Dec 10, 2017
  6. Nov 15, 2017
  7. Nov 07, 2017
  8. Oct 09, 2017
  9. Oct 03, 2017
  10. Aug 20, 2017
  11. Aug 06, 2017
    • Petri Lehtinen's avatar
      Merge pull request #359 from sanjay24/master · 93e8cd7d
      Petri Lehtinen authored
      json_dump_file API returns success even when fclose fails
      93e8cd7d
    • Sanjay Kumar's avatar
      json_dump_file API returns success even when fclose fails (consider disk full... · 0abcbce3
      Sanjay Kumar authored
      json_dump_file API returns success even when fclose fails (consider disk full case). API should check the return value of fclose before returning success to its caller. fwrite may not write anything into the file, it simply returns the number of bytes written into the buffer. When disk is full and fclose is called, it results in truncation of the file (resulting in zero sized file). Since, API is returning success, its caller can't take any remedial action on its failure.
      0abcbce3
  12. Jul 21, 2017
  13. Jul 16, 2017
  14. Apr 19, 2017
  15. Apr 13, 2017
  16. Mar 29, 2017
  17. Mar 03, 2017
  18. Mar 02, 2017
  19. Feb 28, 2017
    • Nathaniel McCallum's avatar
      Add JSON_EMBED encoding flag · b8bb078c
      Nathaniel McCallum authored
      The JSON_EMBED encoding flag causes the opening and closing characters
      of the top-level array ('[', ']') or object ('{', '}') to be omitted
      during encoding. This feature makes it possible to concatenate multiple
      arrays or objects in the stream output. It also makes it possible to
      perform outputs of partial composes.
      
      One such example of a partial compose is when outputting a JWE object.
      The output is a JSON object. But it has one top-level attribute
      ("ciphertext") that can grow out of proportion with the rest of the
      metadata. With the JSON_EMBED flag, the other metadata can be composed
      ahead of time and dumped during the beginning of output, where the
      "ciphertext" and "tag" attributes can be streamed out in chunks. Thus,
      the header material can be composed with Jansson and the ciphertext
      itself can be composed manually.
      b8bb078c
  20. Jan 31, 2017
  21. Jan 27, 2017
  22. Jan 26, 2017
  23. Nov 16, 2016
  24. Nov 13, 2016
  25. Oct 25, 2016
  26. Oct 19, 2016
  27. Oct 07, 2016