VirtualBox

Changeset 95338 in vbox for trunk/src/VBox/Main/xml


Ignore:
Timestamp:
Jun 21, 2022 9:20:50 PM (3 years ago)
Author:
vboxsync
Message:

GuestPropertySvc.h,Main: Changed GuestPropValidateName and GuestPropValidateValue to take size_t instead of uint32_t, eliminating the need for a bunch of (uint32_t) casts. Call setErrorBoth when either of the two fails in Main. bugref:10185

File:
1 edited

Legend:

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

    r95337 r95338  
    46574657         * placing it to local cache. */
    46584658
    4659         int rc = GuestPropValidateName(prop.strName.c_str(), (uint32_t)prop.strName.length() + 1  /* '\0' */);
     4659        int rc = GuestPropValidateName(prop.strName.c_str(), prop.strName.length() + 1  /* '\0' */);
    46604660        if (RT_FAILURE(rc))
    46614661        {
     
    46654665        }
    46664666
    4667         rc = GuestPropValidateValue(prop.strValue.c_str(), (uint32_t)prop.strValue.length() + 1  /* '\0' */);
     4667        rc = GuestPropValidateValue(prop.strValue.c_str(), prop.strValue.length() + 1  /* '\0' */);
    46684668        if (rc == VERR_TOO_MUCH_DATA)
    46694669        {
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