diff -urN wine-7.4-orig/include/wine/debug.h wine-7.4/include/wine/debug.h
--- wine-7.4-orig/include/wine/debug.h	2022-03-12 05:45:50 +0900
+++ wine-7.4/include/wine/debug.h	2022-03-23 20:19:54 +0900
@@ -222,7 +222,7 @@
 static inline const char *wine_dbgstr_an( const char *str, int n )
 {
     static const char hex[16] = {'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'};
-    char buffer[300], *dst = buffer;
+    char buffer[1000], *dst = buffer;
 
     if (!str) return "(null)";
     if (!((ULONG_PTR)str >> 16)) return wine_dbg_sprintf( "#%04x", LOWORD(str) );
@@ -266,7 +266,7 @@
 static inline const char *wine_dbgstr_wn( const WCHAR *str, int n )
 {
     static const char hex[16] = {'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'};
-    char buffer[300], *dst = buffer;
+    char buffer[1000], *dst = buffer;
 
     if (!str) return "(null)";
     if (!((ULONG_PTR)str >> 16)) return wine_dbg_sprintf( "#%04x", LOWORD(str) );
diff -urN wine-7.4-orig/libs/wine/debug.c wine-7.4/libs/wine/debug.c
--- wine-7.4-orig/libs/wine/debug.c	2022-03-12 05:45:50 +0900
+++ wine-7.4/libs/wine/debug.c	2022-03-23 20:19:54 +0900
@@ -306,6 +306,7 @@
     if (n == -1) n = strlen(str);
     if (n < 0) n = 0;
     size = 10 + min( 300, n * 4 );
+    size += 1000;
     dst = res = funcs.get_temp_buffer( size );
     *dst++ = '"';
     while (n-- > 0 && dst <= res + size - 9)
@@ -364,6 +365,7 @@
     }
     if (n < 0) n = 0;
     size = 12 + min( 300, n * 5 );
+    size += 1000;
     dst = res = funcs.get_temp_buffer( size );
     *dst++ = 'L';
     *dst++ = '"';
