summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--archival/unzip.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/archival/unzip.c b/archival/unzip.c
index 5e8bac356..1d3291ab8 100644
--- a/archival/unzip.c
+++ b/archival/unzip.c
@@ -159,9 +159,9 @@ static uint32_t find_cdf_offset(void)
off_t end;
end = xlseek(zip_fd, 0, SEEK_END);
- if (end < 1024)
- end = 1024;
end -= 1024;
+ if (end < 0)
+ end = 0;
xlseek(zip_fd, end, SEEK_SET);
full_read(zip_fd, buf, 1024);