From b716c01e66dd0fd6d0a63db9ceec497b43ea3196730b6a38b148183379ad355d Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Thu, 18 Mar 2021 18:31:22 +0000 Subject: [PATCH] Accepting request 876819 from home:mgorse:branches:GNOME:Factory - Add evolution-ews-boo1182882.patch: fix buffer overrun when parsing base64 data (boo#1182882). OBS-URL: https://build.opensuse.org/request/show/876819 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/evolution-ews?expand=0&rev=239 --- evolution-ews-boo1182882.patch | 25 +++++++++++++++++++++++++ evolution-ews.changes | 6 ++++++ evolution-ews.spec | 2 ++ 3 files changed, 33 insertions(+) create mode 100644 evolution-ews-boo1182882.patch diff --git a/evolution-ews-boo1182882.patch b/evolution-ews-boo1182882.patch new file mode 100644 index 0000000..c65d462 --- /dev/null +++ b/evolution-ews-boo1182882.patch @@ -0,0 +1,25 @@ +From 5eba0627725352ef9978d9c0a91e5d0bd13a3789 Mon Sep 17 00:00:00 2001 +From: Milan Crha +Date: Tue, 2 Mar 2021 12:28:09 +0100 +Subject: [PATCH] Allocate large-enough buffer for g_base64_decode_step() + +--- + src/EWS/common/e-soap-message.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/EWS/common/e-soap-message.c b/src/EWS/common/e-soap-message.c +index e559f851..434c19af 100644 +--- a/src/EWS/common/e-soap-message.c ++++ b/src/EWS/common/e-soap-message.c +@@ -248,7 +248,7 @@ soap_sax_characters (gpointer _ctxt, + g_warning ("Failed to write streaming data to file"); + } + } else { +- guchar *bdata = g_malloc (len); ++ guchar *bdata = g_malloc ((len * 3 / 4) + 3); + gsize blen; + + blen = g_base64_decode_step ( +-- +2.30.1 + diff --git a/evolution-ews.changes b/evolution-ews.changes index b75d98f..4ac15b5 100644 --- a/evolution-ews.changes +++ b/evolution-ews.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Mar 3 19:46:04 UTC 2021 - Michael Gorse + +- Add evolution-ews-boo1182882.patch: fix buffer overrun when + parsing base64 data (boo#1182882). + ------------------------------------------------------------------- Fri Feb 12 17:09:25 UTC 2021 - Bjørn Lie diff --git a/evolution-ews.spec b/evolution-ews.spec index 4cb5b2f..c48dc98 100644 --- a/evolution-ews.spec +++ b/evolution-ews.spec @@ -27,6 +27,8 @@ License: LGPL-2.1-only Group: Productivity/Networking/Email/Clients URL: https://wiki.gnome.org/Apps/Evolution Source0: https://download.gnome.org/sources/evolution-ews/3.38/%{name}-%{version}.tar.xz +# PATCH-FIX-UPSTREAM evolution-ews-boo1182882.patch boo#1182882 mgorse@suse.com -- fix buffer overrun when decoding base64 data. +Patch0: evolution-ews-boo1182882.patch BuildRequires: c++_compiler BuildRequires: cmake