Driver is non-compliant with EFI_FILE_PROTOCOL.Read() specs (original) (raw)
Section 13.5 File Protocol of the UEFI Specification, Version 2.9 state that, for EFI_FILE_PROTOCOL.Read():
If
Thisis a directory, the function reads the directory entry at the file’s current position and returns the entry inBuffer. If theBufferis not large enough to hold the current directory entry, thenEFI_BUFFER_TOO_SMALLis returned and (...)BufferSizeis set to be the size of the buffer needed to read the entry.
However, as part of the investigation of pbatard/rufus#2210, we found that the current version of the driver may return 0 for BufferSize, if Buffer is not large enough, instead of the size of the buffer required to read the entry.