VirtualBox

Changeset 93283 in vbox


Ignore:
Timestamp:
Jan 17, 2022 7:35:39 PM (3 years ago)
Author:
vboxsync
Message:

Runtime/efi: Fix variable size inconsistencies exposed by endianness conversions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/efi/efivarstorevfs.cpp

    r93115 r93283  
    20662066    /* Read in the block map and verify it as well. */
    20672067    uint64_t cbFvVol = 0;
    2068     uint16_t cbFvHdr = sizeof(*pFvHdr);
     2068    uint64_t cbFvHdr = sizeof(*pFvHdr);
    20692069    uint64_t offBlockMap = sizeof(*pFvHdr);
    20702070    for (;;)
     
    25132513        memcpy(&FtwHdr.GuidSignature, &GuidFtwArea, sizeof(GuidFtwArea));
    25142514        FtwHdr.fWorkingBlockValid = RT_H2LE_U32(0xfffffffe); /** @todo */
    2515         FtwHdr.cbWriteQueue       = RT_H2LE_U64(0xfe0); /* This comes from the default OVMF variable volume. */
     2515        FtwHdr.cbWriteQueue       = RT_H2LE_U64(0xfe0ULL); /* This comes from the default OVMF variable volume. */
    25162516        FtwHdr.u32Chksum          = RTCrc32(&FtwHdr, sizeof(FtwHdr));
    25172517
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette