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

Werner Koch wk at gnupg.org
Fri Jul 7 17:28:38 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. 

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.


Shalom-Salam,

   Werner




More information about the Gcrypt-devel mailing list