From 8ac68c0ae749495230418caf726ae4ad3068ae5b Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 20 Nov 2017 09:59:59 +0100 Subject: test build: add upstream patch for regression in 1.3.1 --- f8ef1a2c7855c0b5dbf7de32269cc7633eb620bd.patch | 35 ++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 f8ef1a2c7855c0b5dbf7de32269cc7633eb620bd.patch (limited to 'f8ef1a2c7855c0b5dbf7de32269cc7633eb620bd.patch') 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 +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; + } + + -- cgit