[FREELDR] PXE: fix backward seeking (broken by r66036)

svn path=/trunk/; revision=66048
This commit is contained in:
Hervé Poussineau
2015-01-17 22:48:29 +00:00
parent 9dd2476ee1
commit 67619ff9c8
+3 -3
View File
@@ -163,9 +163,6 @@ static ARC_STATUS PxeOpen(CHAR* Path, OPENMODE OpenMode, ULONG* FileId)
/* Retrieve the path length without NULL terminator */
PathLen = (Path ? min(strlen(Path), sizeof(_OpenFileName) - 1) : 0);
/* Zero out the file name */
RtlZeroMemory(_OpenFileName, sizeof(_OpenFileName));
/* Lowercase the path and always use slashes as separators */
for (i = 0; i < PathLen; i++)
{
@@ -175,6 +172,9 @@ static ARC_STATUS PxeOpen(CHAR* Path, OPENMODE OpenMode, ULONG* FileId)
_OpenFileName[i] = tolower(Path[i]);
}
/* Zero out rest of the file name */
RtlZeroMemory(_OpenFileName + PathLen, sizeof(_OpenFileName) - PathLen);
RtlZeroMemory(&sizeData, sizeof(sizeData));
sizeData.ServerIPAddress = _ServerIP;
RtlCopyMemory(sizeData.FileName, _OpenFileName, sizeof(_OpenFileName));