Commit ef9038c7 authored by Rein Klazes's avatar Rein Klazes Committed by Alexandre Julliard

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

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