Commit Graph

10 Commits

Author SHA1 Message Date
Andreas Pasiopoulos
6a4b3f878d Conform to c89 2016-08-11 18:51:29 +03:00
Andreas Pasiopoulos
835290dfdf Add a test case for OOM while allocating memory 2016-08-11 17:18:46 +03:00
Nathaniel McCallum
245e532934 Add json_get_alloc_funcs() to allow alloc function fetching
This is particularly useful in modular situations where the allocation
functions are either unknown or private. For instance, in such cases,
the caller of json_dumps() has no way to free the returned buffer.
2015-12-21 11:46:32 -05:00
Kinam Kim
875b78dc97 Update test_memory_funcs.c 2015-08-13 16:44:31 +09:00
Petri Lehtinen
8f80c2d838 CVE-2013-6401: Change hash function, randomize hashes
Thanks to Florian Weimer and Eric Sesterhenn for reporting, reviewing
and testing.
2014-02-11 08:41:30 +02:00
Petri Lehtinen
67a7bc7376 doc: Set all memory to zero in secure_free 2013-11-14 08:49:16 +02:00
Paul Harris
f62b1f5d69 Bugfix: must cast void* to do pointer math
Fixes #78.
2012-06-06 21:09:47 +03:00
Petri Lehtinen
a2381948bb Make hashtable less generic
This will make it possible to implement json_object_foreach(). It
should also have some (positive) effect on speed.
2012-01-24 21:01:23 +02:00
Petri Lehtinen
d7ddbf3661 Make real number encoding and decoding work under all locales
The decimal point '.' is changed to locale's decimal point
before/after JSON conversion to make C standard library's
locale-specific string conversion functions work correctly.

All the tests now call setlocale(LC_ALL, "") on startup to use the
locale set in the environment.

Fixes GH-32.
2011-10-02 21:31:17 +03:00
Petri Lehtinen
4be9e9e7fe Add custom memory allocation
Thanks to Basile Starynkevitch for the suggestion and initial patch.
Thanks to Jonathan Landis and Deron Meranda for showing how this can
be utilized for implementing secure memory operations.
2011-02-17 10:10:53 +02:00