VirtualBox

Changeset 91383 in vbox


Ignore:
Timestamp:
Sep 27, 2021 9:59:01 AM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
147062
Message:

Devices/FlashCore: Fix loading a flash file which is smaller than what is currently configured, bugref:10098

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/EFI/FlashCore.cpp

    r91329 r91383  
    486486    if (RT_SUCCESS(rc))
    487487    {
    488         if (cbFlash == pThis->cbFlashSize)
     488        if (cbFlash <= pThis->cbFlashSize)
    489489            rc = pDrvVfs->pfnReadAll(pDrvVfs, pszNamespace, pszPath, pThis->pbFlash, pThis->cbFlashSize);
    490490        else
    491             return PDMDEV_SET_ERROR(pDevIns, VERR_MISMATCH, N_("Size of the flash device and the content to load doesn't match"));
     491            return PDMDEV_SET_ERROR(pDevIns, VERR_BUFFER_OVERFLOW, N_("Configured flash size is too small to fit the saved NVRAM content"));
    492492    }
    493493
Note: See TracChangeset for help on using the changeset viewer.

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