by annnnd · 12y ago · 0 comments
memset(key, 0, sizeof(key));
if (key[0]) // we are using key, so you can't skip memset()
dropDead();
Unless the compilers "understand" memset and still optimize away the last two lines? I would hope not... Does anyone know how aggressive the C optimizers are these days?They do. That's the whole "problem" - the compiler knows what memset is and what it does, since it's specified in the standard.