VirtualBox

Changeset 103676 in vbox


Ignore:
Timestamp:
Mar 5, 2024 7:57:27 AM (7 months ago)
Author:
vboxsync
Message:

Installer/Windows: Use RT_ELEMENTS in VBoxGetMsiPropUtf8() -- we count WCHARs here (usually 2 bytes, not just bytes as in UTF-8).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Installer/win/InstallHelper/VBoxCommon.cpp

    r99828 r103676  
    7979    {
    8080        WCHAR wszValue[1024]; /* 1024 should be enough for everybody (tm). */
    81         if (VBoxGetMsiProp(hMsi, pwszName, wszValue, sizeof(wszValue)) == ERROR_SUCCESS)
     81        if (VBoxGetMsiProp(hMsi, pwszName, wszValue, RT_ELEMENTS(wszValue)) == ERROR_SUCCESS)
    8282            rc = RTUtf16ToUtf8(wszValue, ppszValue);
    8383        else
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