summaryrefslogtreecommitdiff
path: root/lib/tar
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-12-15 02:30:55 +0100
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-12-15 02:31:54 +0100
commit724524cd401325120de9d96e6a1023c3561c8879 (patch)
tree9219c790cc416664a702e47804304a858829ad0d /lib/tar
parent5cb28dc91a2e23e6f8f7e875e2ea725634526dfe (diff)
Fix tar GNU sparse header parsing
Extract the filename correctly. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/tar')
-rw-r--r--lib/tar/read_header.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/tar/read_header.c b/lib/tar/read_header.c
index 20e7a9f..7d209ae 100644
--- a/lib/tar/read_header.c
+++ b/lib/tar/read_header.c
@@ -160,7 +160,7 @@ static int read_pax_header(FILE *fp, sqfs_u64 entsize, unsigned int *set_by_pax,
*set_by_pax |= PAX_MTIME;
} else if (!strncmp(line, "GNU.sparse.name=", 16)) {
free(out->name);
- out->name = strdup(line + 5);
+ out->name = strdup(line + 16);
if (out->name == NULL)
goto fail_errno;
*set_by_pax |= PAX_NAME;