Commit 1b392bfa authored by Dan Hipschman's avatar Dan Hipschman Committed by Alexandre Julliard

libs/wine: Avoid over-allocating memory in default_dbgstr_wn.

parent 8af1dba5
......@@ -339,7 +339,7 @@ static const char *default_dbgstr_wn( const WCHAR *str, int n )
}
if (n < 0) n = 0;
size = 12 + min( 300, n * 5 );
dst = res = funcs.get_temp_buffer( n * 5 + 7 );
dst = res = funcs.get_temp_buffer( size );
*dst++ = 'L';
*dst++ = '"';
while (n-- > 0 && dst <= res + size - 10)
......
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