mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
(rndw32_gather_random_fast): While adding data use the
size of the object and not the one of its address. Bug reported by Sascha Kiefer.
This commit is contained in:
parent
1517f0e945
commit
4d5285ee87
2 changed files with 12 additions and 5 deletions
|
@ -654,13 +654,14 @@ rndw32_gather_random_fast( void (*add)(const void*, size_t, int), int requester
|
|||
(*add) ( &kernelTime, sizeof (kernelTime), requester );
|
||||
(*add) ( &userTime, sizeof (userTime), requester );
|
||||
|
||||
/* Get the minimum and maximum working set size for the current process */
|
||||
/* Get the minimum and maximum working set size for the
|
||||
current process */
|
||||
GetProcessWorkingSetSize (handle, &minimumWorkingSetSize,
|
||||
&maximumWorkingSetSize);
|
||||
(*add) ( &minimumWorkingSetSize,
|
||||
sizeof (&minimumWorkingSetSize), requester );
|
||||
sizeof (minimumWorkingSetSize), requester );
|
||||
(*add) ( &maximumWorkingSetSize,
|
||||
sizeof (&maximumWorkingSetSize), requester );
|
||||
sizeof (maximumWorkingSetSize), requester );
|
||||
}
|
||||
|
||||
|
||||
|
@ -688,7 +689,7 @@ rndw32_gather_random_fast( void (*add)(const void*, size_t, int), int requester
|
|||
if (QueryPerformanceCounter (&performanceCount)) {
|
||||
if ( debug_me )
|
||||
log_debug ("rndw32#gather_random_fast: perf data\n");
|
||||
(*add) (&performanceCount, sizeof (&performanceCount), requester);
|
||||
(*add) (&performanceCount, sizeof (performanceCount), requester);
|
||||
}
|
||||
else { /* Millisecond accuracy at best... */
|
||||
DWORD aword = GetTickCount ();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue