Bug: Error using GetProcessWorkingSetSize
Mann Ern Kang
mann.ern.kang at gmail.com
Tue May 15 09:55:15 CEST 2012
Hi,
The out parameters for the Win32 API call GetProcessWorkingSetSize are
defined incorrectly in
random/rndw32.c<http://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git;a=blob_plain;f=random/rndw32.c;hb=HEAD>.
The parameters minimumWorkingSetSize and maximumWorkingSetSize should be
declared to be of type SIZE_T, not DWORD. See
http://msdn.microsoft.com/en-us/library/windows/desktop/ms683226%28v=vs.85%29.aspx.
On Windows x64, SIZE_T is 64 bits wide, so the call can end up
erroneously overwriting part of the stack, causing a crash.
Cheers,
Mann Ern
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/attachments/20120515/d0e5cc7b/attachment.htm>
More information about the Gcrypt-devel
mailing list