tar segfaults (busybox 1.8.1)

Denys Vlasenko vda.linux at googlemail.com
Fri Nov 16 20:34:25 UTC 2007


On Friday 16 November 2007 12:24, Alexander Griesser wrote:
> 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.

The problem is, now your tar file is a bit different and may fail to untar.

I updated tar fix:

http://busybox.net/downloads/fixes-1.8.1/busybox-1.8.1-tar_z.patch

please try that
--
vda



More information about the busybox mailing list