[PATCH] ntdll: Don't abort if we overflow the thread debug buffer.
Zebediah Figura
z.figura12 at gmail.com
Thu Jul 5 06:40:50 CDT 2018
Instead, just print it as-is.
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
I encountered this abort() while trying to play a certain video with
winegstreamer, which spewed far too much debug data upon failing to find an
adequate decoder.
dlls/ntdll/debugtools.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/ntdll/debugtools.c b/dlls/ntdll/debugtools.c
index 2c8287d..b418c74 100644
--- a/dlls/ntdll/debugtools.c
+++ b/dlls/ntdll/debugtools.c
@@ -132,10 +132,10 @@ static int NTDLL_dbg_vprintf( const char *format, va_list args )
* debug output */
if ((ret == -1) || (ret >= sizeof(info->output) - (info->out_pos - info->output)))
{
- fprintf( stderr, "wine_dbg_vprintf: debugstr buffer overflow (contents: '%s')\n",
- info->output);
- info->out_pos = info->output;
- abort();
+ write( 2, info->output, info->out_pos - info->output );
+ vfprintf( stderr, format, args );
+ info->out_pos = info->output;
+ return ret;
}
for (end = ret; end > 0; end--) if (info->out_pos[end - 1] == '\n') break;
--
2.7.4
More information about the wine-devel
mailing list