mirror of
git://source.winehq.org/git/wine.git
synced 2024-07-21 12:14:10 +00:00
winedump: Fix buffer overflow in debugstr_wn helper.
This commit is contained in:
parent
cfbe32d557
commit
cf78df3612
|
@ -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++ = '.';
|
||||
|
|
Loading…
Reference in a new issue