VirtualBox

Changeset 22907 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Sep 10, 2009 11:27:09 AM (15 years ago)
Author:
vboxsync
Message:

DevPcBios.cpp: Don't use RTStrAPrintf for simple stuff like this, it may fail.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/PC/DevPcBios.cpp

    r22823 r22907  
    11491149    pOEMStrings->u8Count          = 2;
    11501150
    1151     char* pszVBoxVer, *pszVBoxRev;
    1152     RTStrAPrintf(&pszVBoxVer, "vboxVer_%d.%d.%d",
    1153                   RTBldCfgVersionMajor(), RTBldCfgVersionMinor(), RTBldCfgVersionBuild());
    1154     RTStrAPrintf(&pszVBoxRev, "vboxRev_%ld", RTBldCfgRevision());
    1155     READCFGSTR("DmiOEMVBoxVer", pszDmiOEMVBoxVer, pszVBoxVer);
    1156     READCFGSTR("DmiOEMVBoxRev", pszDmiOEMVBoxRev, pszVBoxRev);
     1151    char szTmp[64];
     1152    RTStrPrintf(szTmp, sizeof(szTmp), "vboxVer_%u.%u.%u",
     1153                RTBldCfgVersionMajor(), RTBldCfgVersionMinor(), RTBldCfgVersionBuild());
     1154    READCFGSTR("DmiOEMVBoxVer", pszDmiOEMVBoxVer, szTmp);
     1155    RTStrPrintf(szTmp, sizeof(szTmp), "vboxRev_%u", RTBldCfgRevision());
     1156    READCFGSTR("DmiOEMVBoxRev", pszDmiOEMVBoxRev, szTmp);
    11571157    SETSTRING(pOEMStrings->u8VBoxVersion, pszDmiOEMVBoxVer);
    11581158    SETSTRING(pOEMStrings->u8VBoxRevision, pszDmiOEMVBoxRev);
    1159     RTStrFree(pszVBoxVer);
    1160     RTStrFree(pszVBoxRev);
    11611159    *pszStr++                    = '\0';
    11621160
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