Hi,
On Tue, May 9, 2017 at 1:47 PM, David Sommerseth <openvpn@sf.lists.
topphemmelig.net> wrote:
> That said, I think we should fix secure_memzero() to just return if the
> input pointer is NULL. And even though most compilers do initialize
> variables, I think it's good to be defensive here and initialize `up` too.
>
No, compiler will not initialize such non-static local variables. In fact
in this case gcc will warn (with -Wall) that "up" may be used uninitalized
because of code paths where "up" is not allocated as you pointed out.
In that sense its better not to initialize such variables as initialization
can hide errors.
Selva
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel