tar: compatibility, allow empty magic aswell
This commit is contained in:
parent
00883efc16
commit
9d95321f0b
2
tar.c
2
tar.c
|
@ -401,7 +401,7 @@ chktar(struct header *h)
|
||||||
|
|
||||||
if (h->prefix[0] == '\0' && h->name[0] == '\0')
|
if (h->prefix[0] == '\0' && h->name[0] == '\0')
|
||||||
goto bad;
|
goto bad;
|
||||||
if (strncmp("ustar", h->magic, 5))
|
if (h->magic[0] && strncmp("ustar", h->magic, 5))
|
||||||
goto bad;
|
goto bad;
|
||||||
memcpy(tmp, h->chksum, sizeof(tmp));
|
memcpy(tmp, h->chksum, sizeof(tmp));
|
||||||
for (i = 0; i < sizeof(tmp); i++)
|
for (i = 0; i < sizeof(tmp); i++)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user