Commit f2040b77 authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

crypt32: Don't copy past end of buffer when removing a string from a multi string.

parent 916e38f9
...@@ -881,9 +881,11 @@ static BOOL CRYPT_RemoveStringFromMultiString(LPWSTR multi, LPCWSTR toRemove) ...@@ -881,9 +881,11 @@ static BOOL CRYPT_RemoveStringFromMultiString(LPWSTR multi, LPCWSTR toRemove)
} }
else else
{ {
LPCWSTR nextStr = spotToRemove + lstrlenW(toRemove) + 1;
/* Copy remainder of string "left" */ /* Copy remainder of string "left" */
memmove(spotToRemove, spotToRemove + lstrlenW(toRemove) + 1, memmove(spotToRemove, nextStr,
(len - (spotToRemove - multi)) * sizeof(WCHAR)); (len - (nextStr - multi)) * sizeof(WCHAR));
} }
ret = TRUE; ret = TRUE;
} }
......
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