aboutsummaryrefslogtreecommitdiffstats
path: root/cipher/rndw32.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2005-03-23 08:50:27 +0000
committerWerner Koch <[email protected]>2005-03-23 08:50:27 +0000
commit4d5285ee8744f0cbbecd22109116d517c84af345 (patch)
treeec342c8a43b7d080d753462e7cdb30dda6d4adf5 /cipher/rndw32.c
parent* gpgkeys_ldap.c, ksutil.h, ksutil.c (print_nocr): Moved from (diff)
downloadgnupg-4d5285ee8744f0cbbecd22109116d517c84af345.tar.gz
gnupg-4d5285ee8744f0cbbecd22109116d517c84af345.zip
(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.
Diffstat (limited to '')
-rw-r--r--cipher/rndw32.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/cipher/rndw32.c b/cipher/rndw32.c
index 5e42353aa..28602fd5f 100644
--- a/cipher/rndw32.c
+++ b/cipher/rndw32.c
@@ -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 ();