summaryrefslogtreecommitdiffstats
path: root/f8ef1a2c7855c0b5dbf7de32269cc7633eb620bd.patch
diff options
context:
space:
mode:
Diffstat (limited to 'f8ef1a2c7855c0b5dbf7de32269cc7633eb620bd.patch')
-rw-r--r--f8ef1a2c7855c0b5dbf7de32269cc7633eb620bd.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/f8ef1a2c7855c0b5dbf7de32269cc7633eb620bd.patch b/f8ef1a2c7855c0b5dbf7de32269cc7633eb620bd.patch
new file mode 100644
index 0000000..9f5b71a
--- /dev/null
+++ b/f8ef1a2c7855c0b5dbf7de32269cc7633eb620bd.patch
@@ -0,0 +1,35 @@
+From f8ef1a2c7855c0b5dbf7de32269cc7633eb620bd Mon Sep 17 00:00:00 2001
+From: Dieter Baron <dillo@nih.at>
+Date: Mon, 20 Nov 2017 09:23:02 +0100
+Subject: [PATCH] Do not discard za in case of error.
+
+Fixes serious bug introduced in 1.3.1.
+---
+ lib/zip_close.c | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/lib/zip_close.c b/lib/zip_close.c
+index 71f4bf7..2aff0dd 100644
+--- a/lib/zip_close.c
++++ b/lib/zip_close.c
+@@ -216,15 +216,16 @@ zip_close(zip_t *za)
+ }
+ }
+
++ _zip_progress_end(za->progress);
++
+ if (error) {
+ zip_source_rollback_write(za->src);
++ return -1;
+ }
+
+- _zip_progress_end(za->progress);
+-
+ zip_discard(za);
+-
+- return error ? -1 : 0;
++
++ return 0;
+ }
+
+