mirror of
https://github.com/LongSoft/UEFITool.git
synced 2025-05-13 06:34:42 -04:00
Fix OOB access with volume.mid(headerSize)
This commit is contained in:
parent
37372cdab4
commit
7a25a52427
1 changed files with 3 additions and 0 deletions
|
@ -1135,6 +1135,9 @@ USTATUS FfsParser::parseVolumeHeader(const UByteArray & volume, const UINT32 loc
|
||||||
msgInvalidChecksum = true;
|
msgInvalidChecksum = true;
|
||||||
|
|
||||||
// Get info
|
// Get info
|
||||||
|
if (headerSize >= volume.size()) {
|
||||||
|
return U_INVALID_VOLUME;
|
||||||
|
}
|
||||||
UByteArray header = volume.left(headerSize);
|
UByteArray header = volume.left(headerSize);
|
||||||
UByteArray body = volume.mid(headerSize);
|
UByteArray body = volume.mid(headerSize);
|
||||||
UString name = guidToUString(volumeHeader->FileSystemGuid);
|
UString name = guidToUString(volumeHeader->FileSystemGuid);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue