Commit e5404d4b authored by Sebastian Lackner's avatar Sebastian Lackner Committed by Alexandre Julliard

mscoree: Avoid buffer overflow when mono print handler returns huge string at once.

parent ce53cb4a
......@@ -272,7 +272,13 @@ static void CDECL mono_shutdown_callback_fn(MonoProfiler *prof)
static void CDECL mono_print_handler_fn(const char *string, INT is_stdout)
{
wine_dbg_printf("%s", string);
const char *p;
for (; *string; string = p)
{
if ((p = strstr(string, "\n"))) p++;
else p = string + strlen(string);
wine_dbg_printf("%.*s", (int)(p - string), string);
}
}
static HRESULT CLRRuntimeInfo_GetRuntimeHost(CLRRuntimeInfo *This, RuntimeHost **result)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment