On Thu, 08 Jan 2004 19:43:24 -0500 Noldata TAC <tac@noldata.com> wrote: > You must execute it: > > glozano@Grissom:~$ more a.c > int main(void) > { > printf("%c","msux"[0xcafebabe]); > } > glozano@Grissom:~$ make a > cc a.c -o a > glozano@Grissom:~$ ./a > Segmentation fault That code MUST segfault everywere! Look at it: It passes the 0xcafebabe'nd (3405691582'nd) byte of "msux" to printf. I'm pretty sure that's out of bounds of the five bytes of "msux\0". Only were the COMPILER segfaults it is not like it should be. Please don't post any more segfaults of the resulting binary - it proves _nothing_. -- Dennis Freise <cat@final-frontier.ath.cx> GnuPG key fingerprint: 2DE8 CCEF 6E20 11D4 3B27 21EC B0BA 1749 D2C8 38ED Get my public key at : http://www.final-frontier.ath.cx/gpg_public_key.txt
Attachment:
pgp00015.pgp
Description: PGP signature