manbytesgnu_site

Source files for manbytesgnu.org
git clone git://holbrook.no/manbytesgnu_site.git
Info | Log | Files | Refs

bare.c (246B)


      1 #include "string.h"
      2 
      3 extern unsigned char __heap_base;
      4 extern void call_me_sometime(unsigned char *b);
      5 
      6 void foo() {
      7 	unsigned char *buf = (unsigned char*)&__heap_base;
      8 	*(buf+3) = 'b';
      9 	*(buf+4) = 'a';
     10 	*(buf+5) = 'r';
     11 	call_me_sometime(buf);
     12 }