From 0904d0aeae7c1861c92234a08db068dfd7b9c737 Mon Sep 17 00:00:00 2001 From: Mathieu Bourgeois Date: Tue, 17 Jul 2018 14:01:18 -0400 Subject: [PATCH] Fix LogcatTextWriter_Log interpreting messages it logs, potentially writing random garbage and/or crashing (introduced by https://github.com/mono/mono/commit/984f6484666c2ee6fefec949c81fdff1189c9488) (Fixes https://github.com/xamarin/xamarin-android/issues/1951) --- mono/metadata/icall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mono/metadata/icall.c b/mono/metadata/icall.c index 2510809f0b13..7081b9714620 100644 --- a/mono/metadata/icall.c +++ b/mono/metadata/icall.c @@ -8060,7 +8060,7 @@ ves_icall_System_Runtime_InteropServices_WindowsRuntime_UnsafeNativeMethods_Wind ICALL_EXPORT void ves_icall_System_IO_LogcatTextWriter_Log (const char *appname, gint32 level, const char *message) { - g_log (appname, (GLogLevelFlags)level, message); + g_log (appname, (GLogLevelFlags)level, "%s", message); } static MonoIcallTableCallbacks icall_table;