Fatal error encountered in Win32 version.

Martin Grap mgrap at acm.org
Mon Oct 11 23:56:57 CEST 1999


Hi all,

> I have done a workaround which increases the buffer up to a maximum of
> 512k.  If this won't work, we have a problem in the Winseed DLL;
> however according to it's documentaion this error can be expected. 

What happened is that all the information winseed tried to gather did
not fit into its internal buffer. As I was not sure whether the partial
data 
returned by some Win32 calls is "good" even if these calls fail I
decided to flag 
this as an error. I could have tried to verify the "fitness" of the data
returned 
in case of an error but this has the problem that I can only check a few
buffer
sizes and I can check only under the Windows versions I have access to.
What is 
more I can not check future Windows versions or service packs and there
could be 
instances where the data is usable and others were it is not.

Increasing the internal seed size to 512K should work in principle but
there 
is a potential "problem" associated with this approach, as it has the 
consequence that winseed allocates 512K in each call to WS_get_seed.
Even 
though machines are bigger today this is still a pretty big chunk of
memory.

The following approach could help to ease this problem. One could
specify a
maximum value for the internal seed size  (let's say 512K). WS_get_seed
could
then be called in a loop. If it returns PCP_SEEDER_TOO_SMALL then
increase the
internal seed size by 64K and retry. This is done until WS_get_seed
returns
PCP_SUCCESS or the maximum value for the internal seed size is reached.
This
ensures that WS_get_seed only has to allocate  the amount of memory it
really
needs (plus 64K in the worst case).

It would be really nice if the maximum internal seed size could be
configured 
by the user. This would ensure that winseed and therefore GPG could deal
even
with "extreme" cases.

Regards,

Martin



More information about the Gnupg-devel mailing list