On Sat, 18 Jun 2011, Nicolas Pitre wrote:

> int main(int argc, char * argv[])
> {
>      char buf[8];
>      void *v = &buf[1];
>      unsigned int *p = (unsigned int *)v;
> 
>      strcpy(buf, "abcdefg");
> 
>      printf("*%p = 0x%08x\n", p, *p);
> 
>      return 0;
> }

Obviously, there is a buffer overflow here, so the buf array should be 
enlarged.


Nicolas


-- 
To UNSUBSCRIBE, email to debian-arm-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/alpine.lfd.2.00.1106181440590.2...@xanadu.home

Reply via email to