[Heimdal-source-changes] [heimdal/heimdal] 4cf66a: roken: use Win32 rand_s() for rk_random() when ava...
GitHub
noreply at github.com
Sat Apr 11 07:36:51 CEST 2015
Branch: refs/heads/master
Home: https://github.com/heimdal/heimdal
Commit: 4cf66ae8e4341b02d45ddba9cf860c79e731b3fb
https://github.com/heimdal/heimdal/commit/4cf66ae8e4341b02d45ddba9cf860c79e731b3fb
Author: Jeffrey Altman <jaltman at secure-endpoints.com>
Date: 2015-04-11 (Sat, 11 Apr 2015)
Changed paths:
M lib/roken/rand.c
M lib/roken/roken.h.in
Log Message:
-----------
roken: use Win32 rand_s() for rk_random() when available
On Windows if the compiler and C RTL is >= 1400 then the rand_s()
function is available. rand_s() unlike rand() makes use of the
RtlGenRandom() API to produce a random number between 0 and UINT_MAX.
If rand_s() is not available or fails, fallback to rand().
One of the benefits of rand_s() is that no initialization is required
so it will provide random output even if rk_random_init() is not called.
Change-Id: I2768155de744bd49604fc8237728bb205d637f2a
More information about the Heimdal-source-changes
mailing list