File evolution-ews-boo1182882.patch of Package evolution-ews.18658

From 5eba0627725352ef9978d9c0a91e5d0bd13a3789 Mon Sep 17 00:00:00 2001
From: Milan Crha <mcrha@redhat.com>
Date: Tue, 2 Mar 2021 12:28:09 +0100
Subject: [PATCH] Allocate large-enough buffer for g_base64_decode_step()

Backported by Mike Gorse <mgorse@suse.com>
---
diff -urp evolution-ews-3.34.4.orig/src/server/e-soap-message.c evolution-ews-3.34.4/src/server/e-soap-message.c
--- evolution-ews-3.34.4.orig/src/server/e-soap-message.c	2020-02-14 03:33:57.000000000 -0600
+++ evolution-ews-3.34.4/src/server/e-soap-message.c	2021-03-01 15:04:49.726343897 -0600
@@ -276,7 +276,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 (
openSUSE Build Service is sponsored by