VirtualBox

Changeset 61011 in vbox for trunk


Ignore:
Timestamp:
May 17, 2016 6:22:29 PM (8 years ago)
Author:
vboxsync
Message:

Main/xml/Settings.cpp: clear string before getting icon override data (otherwise keeps previous content) and handle base64 encoding errors better

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/xml/Settings.cpp

    r61009 r61011  
    479479    ssize_t cbOut = RTBase64DecodedSize(psz, NULL);
    480480    if (cbOut > DECODE_STR_MAX)
    481         throw ConfigFileError(this, NULL, N_("Base64 encoded data too long. %d > %d"), cbOut, DECODE_STR_MAX);
     481        throw ConfigFileError(this, NULL, N_("Base64 encoded data too long (%d > %d)"), cbOut, DECODE_STR_MAX);
     482    else if (cbOut < 0)
     483        throw ConfigFileError(this, NULL, N_("Base64 encoded data '%s' invalid"), psz);
    482484    binary.resize(cbOut);
    483485    int vrc = VINF_SUCCESS;
     
    49734975        elmMachine.getAttributeValue("processPriority", machineUserData.strVMPriority);
    49744976
     4977        str.setNull();
    49754978        elmMachine.getAttributeValue("icon", str);
    49764979        parseBase64(machineUserData.ovIcon, str);
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