VirtualBox

Changeset 90126 in vbox for trunk/src/VBox/Runtime/common


Ignore:
Timestamp:
Jul 9, 2021 2:15:18 PM (4 years ago)
Author:
vboxsync
Message:

Runtime/evivarstorevfs.cpp: Allow overwriting variable data (no variable deletion and creation yet), bugref:9580 [build fix]

File:
1 edited

Legend:

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

    r90125 r90126  
    715715        return VINF_SUCCESS;
    716716
     717    if ((uint32_t)cbData != cbData)
     718        return VERR_FILE_TOO_BIG;
     719
    717720    int rc = VINF_SUCCESS;
    718721    if (cbData < pVar->cbData)
     
    724727            pVar->pvData = pvNew;
    725728            pVarStore->cbVarData -= pVar->cbData - cbData;
    726             pVar->cbData = cbData;
     729            pVar->cbData = (uint32_t)cbData;
    727730        }
    728731        else
     
    739742                pVar->pvData = pvNew;
    740743                pVarStore->cbVarData += cbData - pVar->cbData;
    741                 pVar->cbData          = cbData;
     744                pVar->cbData          = (uint32_t)cbData;
    742745            }
    743746            else
     
    10691072{
    10701073    RT_NOREF(pvThis);
    1071     *pcbMax = INT64_MAX; /** @todo */
     1074    *pcbMax = UINT32_MAX;
    10721075    return VINF_SUCCESS;
    10731076}
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