Skip to content

Commit

Permalink
Fix SectorReadWrite
Browse files Browse the repository at this point in the history
  • Loading branch information
Ceiridge committed Jul 5, 2022
1 parent 9d58173 commit 3610372
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion WinFsp-MemFs-Extended/memfs-main.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ NTSTATUS SvcStart(FSP_SERVICE* Service, ULONG argc, PWSTR* argv)
PWSTR DebugLogFile = 0;
ULONG Flags = MemfsDisk;
ULONG OtherFlags = 0;
ULONG FileInfoTimeout = 0; //INFINITE;
ULONG FileInfoTimeout = 0; //memefs: Used to be INFINITE;
UINT64 MaxFsSize = 0;
ULONG SlowioMaxDelay = 0; /* -M: maximum slow IO delay in millis */
ULONG SlowioPercentDelay = 0; /* -P: percent of slow IO to make pending */
Expand Down
2 changes: 1 addition & 1 deletion WinFsp-MemFs-Extended/memfs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ BOOL SectorReadWrite(PVOID Buffer, MEMEFS_SECTOR_VECTOR* SectorVector, std::mute
sectorEnd++; // Needs to read one more sector to account for the bytes from the first sector to receive the full length
}

if (offsetSectorBegin >= sectorCount || sectorEnd >= sectorCount || offsetOffset > MEMEFS_SECTOR_SIZE)
if (offsetSectorBegin >= sectorCount || sectorEnd > sectorCount || offsetOffset > MEMEFS_SECTOR_SIZE)
{
return FALSE;
}
Expand Down

0 comments on commit 3610372

Please sign in to comment.