mirror of
https://github.com/sheumann/hush.git
synced 2025-01-18 07:31:34 +00:00
Correctly remove leading slashes upon extraction (thanks to Marius Groeger).
This commit is contained in:
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…
x
Reference in New Issue
Block a user