On 5/5/2011 00:38, Adam Martinson wrote:
Fixes bugs 14864 + 16453.
dlls/msxml3/domdoc.c | 27 +++++++++++++ dlls/msxml3/tests/domdoc.c | 94 +++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 120 insertions(+), 1 deletions(-)
- case VT_ARRAY|VT_UI1:
{
SAFEARRAY *psa = V_ARRAY(&source);
xmlChar *str;
LONG len;
UINT dim = SafeArrayGetDim(psa);
switch (dim)
{
case 0:
ERR("SAFEARRAY == NULL\n");
hr = E_INVALIDARG;
break;
case 1:
/* Only takes UTF8 strings.
* NOT NULL-terminated. */
SafeArrayAccessData(psa, (void**)&str);
SafeArrayGetUBound(psa, 1,&len);
hr = load_utf8(This, str, ++len, isSuccessful);
SafeArrayUnaccessData(psa);
break;
default:
FIXME("unhandled SAFEARRAY dim: %d\n", dim);
hr = E_NOTIMPL;
}
}
This could be simplified. SafeArrayGetUBound will fail for case 0 for example, and unhandled dimension should be WARN, IMO.