vbscript: Don't abort when trying to TRACE() functions with many arguments.
commit0fb2d0f04e321100d0e166b804c2898f52be2ce7
authorKevin Puetz <PuetzKevinA@JohnDeere.com>
Wed, 28 Sep 2022 22:53:36 +0000 (28 17:53 -0500)
committerAlexandre Julliard <julliard@winehq.org>
Thu, 29 Sep 2022 15:59:36 +0000 (29 17:59 +0200)
treece7538d4a91fe17446a2e87eec11f6177947c636
parente24791268dd788794382f511394c8ca6e6d8ba9e
vbscript: Don't abort when trying to TRACE() functions with many arguments.

__wine_dbg_output accumulates the output characters in a debug_info
structure, flushing it when it encounters '\n'. If debug_info plus the
new string exceed 1024 characters, append_output will print

> wine_dbg_output: debugstr buffer overflow

and then crash the process via abort().

wine_dbgstr_variant limits the length printed for any individual argument,
but a function with multiple parameters can still plausibly exceed 1024.

Fixed by formatting the TRACE for each argument on a separate line,
as similar places (like oleaut32/typelib.c:dump_DispParms) do.
dlls/vbscript/interp.c
dlls/vbscript/tests/api.vbs