Patch: set value of static variables in cipher/random.c

haypo at inl.fr haypo at inl.fr
Mon Jul 10 14:38:14 CEST 2006


> On Fri,  7 Jul 2006 17:10, haypo at inl.fr said:
>
>> I'm not sure, but I think that a static variable have "undefined
value". So I don't understand how the code is working without value
>> initialization
>
> No they are not undefined.  They are initialized to zero.

Ah ok ;-)

> Your patch actually changes the code because the variables are moved
from the BSS to the DATA segment.  That is in general not a problem but it
increases the size of the binary.

So don't apply my patch. I didn't know that.

Victor Stinner
PS: Ooops, I forget to set gnutls-devel at gnupg.org for "To:" email field value







More information about the Gcrypt-devel mailing list