msvcrt: Fix read beyond end of string in __unDNameEx().

This commit is contained in:
Rein Klazes 2006-03-30 16:30:01 +02:00 committed by Alexandre Julliard
parent fee66fb15a
commit ef9038c761
1 changed files with 1 additions and 2 deletions

View File

@ -1233,8 +1233,7 @@ char* __unDNameEx(char* buffer, const char* mangled, int buflen,
result = symbol_demangle(&sym) ? sym.result : mangled;
if (buffer && buflen)
{
memcpy(buffer, result, buflen - 1);
buffer[buflen - 1] = '\0';
lstrcpynA( buffer, result, buflen);
}
else
{