mirror of https://github.com/mirror/busybox.git
Correctly remove leading slashes upon extraction (thanks to Marius Groeger).
parent
1d9d41150b
commit
7f7348b7b2
|
@ -490,7 +490,7 @@ readTarHeader(struct TarHeader *rawHeader, struct TarInfo *header)
|
||||||
static int alreadyWarned=FALSE;
|
static int alreadyWarned=FALSE;
|
||||||
|
|
||||||
while (*(header->name) == '/')
|
while (*(header->name) == '/')
|
||||||
++*(header->name);
|
header->name++;
|
||||||
|
|
||||||
if (alreadyWarned == FALSE) {
|
if (alreadyWarned == FALSE) {
|
||||||
error_msg("Removing leading '/' from member names");
|
error_msg("Removing leading '/' from member names");
|
||||||
|
|
2
tar.c
2
tar.c
|
@ -490,7 +490,7 @@ readTarHeader(struct TarHeader *rawHeader, struct TarInfo *header)
|
||||||
static int alreadyWarned=FALSE;
|
static int alreadyWarned=FALSE;
|
||||||
|
|
||||||
while (*(header->name) == '/')
|
while (*(header->name) == '/')
|
||||||
++*(header->name);
|
header->name++;
|
||||||
|
|
||||||
if (alreadyWarned == FALSE) {
|
if (alreadyWarned == FALSE) {
|
||||||
error_msg("Removing leading '/' from member names");
|
error_msg("Removing leading '/' from member names");
|
||||||
|
|
Loading…
Reference in New Issue