From bcd172662aaec169765bce7c4029cbf5e1c28441 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Fri, 21 Jun 2019 14:09:39 +0200 Subject: fix: flipped conditional in tar header parser 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 bdb2d20..131f5dc 100644 --- a/lib/tar/read_header.c +++ b/lib/tar/read_header.c @@ -223,7 +223,7 @@ static int decode_header(const tar_header_t *hdr, unsigned int set_by_pax, size_t count; if (!(set_by_pax & PAX_NAME)) { - if (hdr->prefix[0] == '\0') { + if (hdr->prefix[0] != '\0') { count = strlen(hdr->name) + 1; count += strlen(hdr->prefix) + 1; -- cgit v1.2.3