Sujet : Re: A Famous Security Bug
De : joerg-mertens (at) *nospam* t-online.de (Joerg Mertens)
Groupes : comp.lang.cDate : 20. Mar 2024, 19:59:36
Autres entêtes
Organisation : privat
Message-ID : <87ttl0pw4n.fsf@jmertens.eternal-september.org>
References : 1
User-Agent : Gnus/5.13 (Gnus v5.13)
ram@zedat.fu-berlin.de (Stefan Ram) writes:
A "famous security bug":
>
void f( void )
{ char buffer[ MAX ];
/* . . . */
memset( buffer, 0, sizeof( buffer )); }
>
. Can you see what the bug is?
>
(I have already read the answer; I post it as a pastime.)
The optimizer deletes the memset statement because buffer is not
accessed after it?