Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: GnuPG: gcrypt

Bug: Error using GetProcessWorkingSetSize

 

 

GnuPG gcrypt RSS feed   Index | Next | Previous | View Threaded


mann.ern.kang at gmail

May 15, 2012, 12:55 AM

Post #1 of 3 (495 views)
Permalink
Bug: Error using GetProcessWorkingSetSize

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


wk at gnupg

May 15, 2012, 4:23 AM

Post #2 of 3 (450 views)
Permalink
Re: Bug: Error using GetProcessWorkingSetSize [In reply to]

On Tue, 15 May 2012 09:55, mann.ern.kang [at] gmail said:

> On Windows x64, SIZE_T is 64 bits wide, so the call can end up
> erroneously overwriting part of the stack, causing a crash.

Again: You may not use Libgcrypt for 64 bit - the RNG is not up to that.
Changing the types of certain variables is not a solution.


Salam-Shalom,

Werner

--
Die Gedanken sind frei. Ausnahmen regelt ein Bundesgesetz.


_______________________________________________
Gcrypt-devel mailing list
Gcrypt-devel [at] gnupg
http://lists.gnupg.org/mailman/listinfo/gcrypt-devel


mann.ern.kang at gmail

May 15, 2012, 5:58 AM

Post #3 of 3 (455 views)
Permalink
Re: Bug: Error using GetProcessWorkingSetSize [In reply to]

Ah, my apologies, was not aware of this limitation. Should have checked the
mailing list archives first. Thanks for the clarification.

Cheers,
Mann Ern

On Tue, May 15, 2012 at 7:23 PM, Werner Koch <wk [at] gnupg> wrote:

> On Tue, 15 May 2012 09:55, mann.ern.kang [at] gmail said:
>
> > On Windows x64, SIZE_T is 64 bits wide, so the call can end up
> > erroneously overwriting part of the stack, causing a crash.
>
> Again: You may not use Libgcrypt for 64 bit - the RNG is not up to that.
> Changing the types of certain variables is not a solution.
>
>
> Salam-Shalom,
>
> Werner
>
> --
> Die Gedanken sind frei. Ausnahmen regelt ein Bundesgesetz.
>
>

GnuPG gcrypt RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.