[90020] in Cypherpunks

home help back first fref pref prev next nref lref last post

Re: smaller f00f.c

daemon@ATHENA.MIT.EDU (Jim Gillogly)
Fri Nov 14 12:15:23 1997

Date: Fri, 14 Nov 97 08:43:19 PST
From: jim@mentat.com (Jim Gillogly)
To: cypherpunks@cyberpass.net, aba@dcs.ex.ac.uk
Reply-To: jim@mentat.com (Jim Gillogly)

Adam says:
> Hey, challenge is on:
> 
> main(){int i=0xc8c70ff0;void (*f)()=&i;f();} /* f00fies 44 char */
> main(){((int(*)())"\360\017\307\310")();}
> main(){int i=0xc8c70ff0,(*f)()=&i;f();}
> main(i){int(*f)()=&i;i=0xc8c70ff0;f();}
> main(i){i=0xc8c70ff0;((int(*)())&i)();}
> (*f)();main(i){f=&i;i=0xc8c70ff0;f();}
> (*f)()="\360\017\307\310";main(){f();}       /* 38 chars */
> 
> Compiled with gcc.

long main=0xc8c70ff0;	/* also gcc; 21 chars, and not my invention */
Without the "long" you get a warning, but it compiles anyway... 16 chars.

	Jim Gillogly
	jim@acm.org


home help back first fref pref prev next nref lref last post