pbatard / uefi-ntfs

UEFI:NTFS - Boot NTFS or exFAT partitions from UEFI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SetPathCase may cause infinite loop on some implementations.

linnaea opened this issue · comments

On some UEFI implementation (several MSI motherboard), when EFI_FILE_PROTOCOL.Read() returns a zero-length buffer, the original content of the buffer is not set to zero, and the loop on line 193 will never terminate if the file cannot be found.

Good call.

I agree that the loop should use while (Size != 0); as you did in uefi-ntfs-multiboot.

For good measure, I also think I'll add a:

ZeroMem(FileInfo, Size);

before:

Status = FileHandle->Read(FileHandle, &Size, (VOID*)FileInfo);

just to be on the safe side.

Many thanks for the report!

By the way, I'm the process of integrating some of your changes from uefi-ntfs-multiboot into uefi-ntfs, as I think you did some very good work there. 👍