Commit Graph

16 Commits

Author SHA1 Message Date
Eric Haszlakiewicz
8086314026 Issue #589: drop the rdrand test loops to just 3, tweak comments and add some links to bug reports, and decrease the nesting level of the has_rdrand() function. 2020-05-04 01:33:15 +00:00
Tudor Brindus
4d36b0287d Detect broken RDRAND during initialization
Some CPUs advertise RDRAND in CPUID, but return 0xFFFFFFFF
unconditionally. To avoid locking up later, test RDRAND during
initialization, and if it returns 0xFFFFFFFF, mark it as nonexistent.

Fixes #588.
2020-05-03 15:15:24 -04:00
Tudor Brindus
0e5bbcaa16 Fix segmentation fault in CPUID check 2020-05-03 14:39:31 -04:00
Eric Haszlakiewicz
5e19c26cae Don't let clang-format rearrange Windows includes, since they need to be in a particular order. 2020-04-06 02:47:34 +00:00
Eric Haszlakiewicz
9acc4e9d71 Format random_seed.c with clang-format, with key asm sections excluded. 2020-04-06 01:52:28 +00:00
Eric Haszlakiewicz
7f30afc6e5 Fix some Windows compile issues, add JSON_EXPORT's, fix bogus character escapes, define __func__ and omit unistd.h if needed. 2019-11-23 20:31:14 -05:00
Rubasri Kalidas
3003161eff Fix compiler warnings 2018-12-18 11:30:57 -06:00
Haffon
3141c3976b 1.make it can been compiled with Visual Studio 2010
2.replace json_object_get/put API with json_object_retain/release, as they operate the reference counter, and confused with array_list_get/put_idx.
3.replace array_list_get/put_idx API with array_list_get/insert to make them more clear to use.
2017-08-22 13:53:47 +08:00
Alexandru Ardelean
fb72160caf build: make strerror() override-able
If we want to override `strerror()` in libjson-c
to make tests consistent across platforms, we
need to do it build-wide as configure/build
option.

Apple linkers make it really hard to override functions
at link-time, and this seems to be locked down on travis-ci.org
[ for security reasons I assume ].
While I got it to work locally, it did not work
when running on travis.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2017-07-13 10:27:24 +03:00
James Myatt
bf32650c83 Add missing include file to random_seed 2015-03-04 10:45:37 +00:00
Eric Haszlakiewicz
9db3099572 Merge pull request #156 from jubalh/master
Remove trailing whitespaces
2015-03-03 21:37:02 -05:00
Eric Haszlakiewicz
2c722277ee Merge pull request #150 from ams-cs/master
Fix build using MinGW.
2014-09-13 22:17:57 -04:00
Michael Vetter
fcf5ad1bd6 Remove trailing whitespace 2014-08-26 14:48:59 +02:00
Andrew Stubbs
ca0ebe0f71 Fix build using MinGW.
MinGW requires wincrypt.h.
GCC does not support #pragma comment, which trips Werror.
2014-08-04 11:44:25 +01:00
Alexandru Costache
4841c48f81 Removed duplicate check in random_seed test - bug #140 2014-07-04 12:28:35 +03:00
Michael Clark
64e36901a0 Patch to address the following issues:
* CVE-2013-6371: hash collision denial of service
* CVE-2013-6370: buffer overflow if size_t is larger than int
2014-04-09 13:48:21 +08:00