Commit 7711f494 authored by Alexandre Julliard's avatar Alexandre Julliard

xcopy: Avoid a potential out of bounds access.

parent 34823028
......@@ -271,11 +271,9 @@ static BOOL XCOPY_ProcessExcludeFile(WCHAR* filename, WCHAR* endOfName) {
EXCLUDELIST *thisEntry;
int length = lstrlenW(buffer);
/* Strip CRLF */
buffer[length-1] = 0x00;
/* If more than CRLF */
if (length > 1) {
buffer[length-1] = 0; /* strip CRLF */
thisEntry = HeapAlloc(GetProcessHeap(), 0, sizeof(EXCLUDELIST));
thisEntry->next = excludeList;
excludeList = thisEntry;
......
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