memset to clear a buffer, but a modern compiler
knows the semantics of memset and can optimize it away.
Even a custom clear function in the same C file can be optimized away by a
clever compiler. Instead, use library functions like memset_s
or explicit_bzero. Crypto libraries like OpenSSL often also have their own
versions too, like OPENSSL_cleanse.sigma star gmbh
Eduard-Bodem-Gasse 6, 1st floor
6020 Innsbruck | Austria