Commit Graph

10 Commits

Author SHA1 Message Date
Björn Esser
a731ae6a75 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.

Also fix a possible segmentation fault in CPUID check.

This commit is a squashed and slightly modified backport
of the following commits on the master branch:

  * 0e5bbcaa16
  * 4d36b0287d
  * 8086314026
2020-06-01 16:45:45 +02: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