Commit cf78df36 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

winedump: Fix buffer overflow in debugstr_wn helper.

parent cfbe32d5
......@@ -49,7 +49,7 @@ static const char *debugstr_wn(const WCHAR *wstr, unsigned int n)
i = 0;
p = buf;
*p++ = '\"';
while (i < n && i < sizeof(buf) - 2 && wstr[i])
while (i < n && i < sizeof(buf) - 3 && wstr[i])
{
if (wstr[i] < 127) *p++ = wstr[i];
else *p++ = '.';
......
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