VirtualBox

Changeset 44592 in vbox for trunk


Ignore:
Timestamp:
Feb 8, 2013 5:18:29 AM (12 years ago)
Author:
vboxsync
Message:

DevEFI.cpp: fix.

File:
1 edited

Legend:

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

    r44591 r44592  
    477477
    478478    /*
    479      * Validate the input a little.
     479     * Validate and adjust the input a little before we start.
    480480     */
    481481    int rc = RTStrValidateEncoding(pThis->NVRAM.VarOpBuf.szName);
    482482    if (RT_FAILURE(rc))
    483483        LogRel(("EFI: Badly encoded variable name: %.*Rhxs\n", pThis->NVRAM.VarOpBuf.cchName + 1, pThis->NVRAM.VarOpBuf.szName));
    484     size_t cchName = RTStrNLen(pThis->NVRAM.VarOpBuf.szName, sizeof(pThis->NVRAM.VarOpBuf.szName));
    485     if (cchName != pThis->NVRAM.VarOpBuf.cchName)
    486     {
    487         LogRel(("EFI: Bad name length %#x, expected %#x: %.*Rhxs\n",
    488                 cchName, pThis->NVRAM.VarOpBuf.cchName, pThis->NVRAM.VarOpBuf.cchName + 1, pThis->NVRAM.VarOpBuf.szName));
    489         rc = VERR_INVALID_PARAMETER;
    490     }
    491484    if (RT_FAILURE(rc))
    492485    {
     
    494487        return VINF_SUCCESS;
    495488    }
     489    pThis->NVRAM.VarOpBuf.cchName = RTStrNLen(pThis->NVRAM.VarOpBuf.szName, sizeof(pThis->NVRAM.VarOpBuf.szName));
    496490
    497491    /*
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