tar segfaults (busybox 1.8.1)

Alexander Griesser alexander.griesser at lkh-vil.or.at
Fri Nov 16 20:24:27 UTC 2007


Tito schrieb:
> by compiling the latest svn i get this warning:
> 
> CC      archival/tar.o
> archival/tar.c: In function ‘writeFileToTarball’:
> archival/tar.c:183: warning: call to __builtin___strcpy_chk will always overflow destination buffer

You're right, I somehow didn't recognize that.

> and after changing the line 183 of tar.c
> 
> -	strcpy(hp->magic, "ustar  ");
> +	strcpy(hp->magic, "ustar");
> 
> there is no segfault due to the fact
> that the size of hp->magic is
> 
> 	char magic[6];            /* 257-262 */
> 

Works for me too.
Thanks && ciao,
Alex



More information about the busybox mailing list