VirtualBox

Changeset 70385 in vbox for trunk/include


Ignore:
Timestamp:
Dec 29, 2017 11:37:30 AM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
119990
Message:

com/array.h: SafeIfaceArray(ComSafeArrayIn(I *, aArg)): We get here with empty arrays on windows and SafeArrayGetIID may then be IID_IDispatch rather than the IID expected by the caller.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/com/array.h

    r70114 r70385  
    16211621            rc = SafeArrayGetIID(arg, &guid);
    16221622            AssertComRCReturnVoid(rc);
    1623             AssertMsgReturnVoid(InlineIsEqualGUID(COM_IIDOF(I), guid),
    1624                                 ("Expected IID {%RTuuid}, got {%RTuuid}.\n",
    1625                                  &COM_IIDOF(I), &guid));
     1623            AssertMsgReturnVoid(InlineIsEqualGUID(COM_IIDOF(I), guid) || arg->rgsabound[0].cElements == 0 /* IDispatch if empty */,
     1624                                ("Expected IID {%RTuuid}, got {%RTuuid}.\n", &COM_IIDOF(I), &guid));
    16261625
    16271626            rc = SafeArrayAccessData(arg, (void HUGEP **)&m.raw);
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette