commit 9d95321f0b3e200b0766ea7635a32ed29e76934a
parent 00883efc163b3d6693f264fdf47fe478288f7590
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sun, 10 May 2015 11:13:02 +0200
tar: compatibility, allow empty magic aswell
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tar.c b/tar.c
@@ -401,7 +401,7 @@ chktar(struct header *h)
if (h->prefix[0] == '\0' && h->name[0] == '\0')
goto bad;
- if (strncmp("ustar", h->magic, 5))
+ if (h->magic[0] && strncmp("ustar", h->magic, 5))
goto bad;
memcpy(tmp, h->chksum, sizeof(tmp));
for (i = 0; i < sizeof(tmp); i++)