From 724524cd401325120de9d96e6a1023c3561c8879 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Sun, 15 Dec 2019 02:30:55 +0100 Subject: Fix tar GNU sparse header parsing Extract the filename correctly. Signed-off-by: David Oberhollenzer --- lib/tar/read_header.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') 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; -- cgit v1.2.3