From 4d5285ee8744f0cbbecd22109116d517c84af345 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Wed, 23 Mar 2005 08:50:27 +0000 Subject: (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. --- cipher/rndw32.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'cipher/rndw32.c') 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 (); -- cgit v1.2.3