From b5505fe02f8ac44bb0000cce10939211a0955c83b3a3c0f3fc50fa888a99370d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Wed, 20 May 2015 10:52:00 +0000 Subject: [PATCH] Accepting request 308098 from home:namtrac:branches:Mono:Factory - Add mono-bug-28777.patch to fix a DeflateStream bug, should fix KeePass problems OBS-URL: https://build.opensuse.org/request/show/308098 OBS-URL: https://build.opensuse.org/package/show/Mono:Factory/mono-core?expand=0&rev=149 --- mono-bug-28777.patch | 28 ++++++++++++++++++++++++++++ mono-core.changes | 6 ++++++ mono-core.spec | 3 +++ 3 files changed, 37 insertions(+) create mode 100644 mono-bug-28777.patch diff --git a/mono-bug-28777.patch b/mono-bug-28777.patch new file mode 100644 index 0000000..6afd46a --- /dev/null +++ b/mono-bug-28777.patch @@ -0,0 +1,28 @@ +From 2dcdfe76d02fed91b71e5b49b6028c6c82e10d4c Mon Sep 17 00:00:00 2001 +From: Gabriel Garcia +Date: Mon, 6 Apr 2015 13:59:43 -0400 +Subject: [PATCH] [System] Fix DeflateStream throw on empty flush, double + flush. Fixes #28777 + +diff --git a/support/zlib-helper.c b/support/zlib-helper.c +index 8345541..3869626 100644 +--- a/support/zlib-helper.c ++++ b/support/zlib-helper.c +@@ -90,6 +90,8 @@ CreateZStream (gint compress, guchar gzip, read_write_func func, void *gchandle) + result->gchandle = gchandle; + result->compress = compress; + result->buffer = g_new (guchar, BUFFER_SIZE); ++ result->stream->next_out = result->buffer; ++ result->stream->avail_out = BUFFER_SIZE; + return result; + } + +@@ -148,7 +150,7 @@ flush_internal (ZStream *stream, gboolean is_final) + if (!stream->compress) + return 0; + +- if (!is_final) { ++ if (!is_final && stream->stream->avail_in != 0) { + status = deflate (stream->stream, Z_PARTIAL_FLUSH); + if (status != Z_OK && status != Z_STREAM_END) + return status; diff --git a/mono-core.changes b/mono-core.changes index c62ad6a..3c47192 100644 --- a/mono-core.changes +++ b/mono-core.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed May 20 09:50:17 UTC 2015 - idonmez@suse.com + +- Add mono-bug-28777.patch to fix a DeflateStream bug, should fix + KeePass problems + ------------------------------------------------------------------- Sat May 2 05:40:26 UTC 2015 - mailaender@opensuse.org diff --git a/mono-core.spec b/mono-core.spec index 21cbcda..f337200 100644 --- a/mono-core.spec +++ b/mono-core.spec @@ -38,6 +38,8 @@ Patch0: mono-nunit-default-runtime-4.5.patch Patch1: mono-3.x-keyboards.resources-cp_r.patch # PATCH-FIX-UPSTREAM https://github.com/mono/mono/commit/acdcee6a43f762edcd3cd295cd4225d8c2b949d1.patch Patch2: amd64-tramp-size.patch +# PATCH-FIX-UPSTREAM https://github.com/mono/mono/commit/bcb651 +Patch3: mono-bug-28777.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: bison @@ -111,6 +113,7 @@ technologies that have been submitted to the ECMA for standardization. %patch0 -p1 %patch1 -p1 %patch2 -p1 +%patch3 -p1 %build NOCONFIGURE="yes" ./autogen.sh