From cfe52abcf46a9a36fc9ecb920df65bf98f199dfa Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Sun, 14 Jun 2015 17:39:42 +0300 Subject: [PATCH] msxml3: Handle SafeArrayAccessData() failure in load() (Coverity). --- dlls/msxml3/domdoc.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dlls/msxml3/domdoc.c b/dlls/msxml3/domdoc.c index e081f1a32f7..8344f3651b0 100644 --- a/dlls/msxml3/domdoc.c +++ b/dlls/msxml3/domdoc.c @@ -2140,7 +2140,13 @@ static HRESULT WINAPI domdoc_load( case 1: /* Only takes UTF-8 strings. * NOT NULL-terminated. */ - SafeArrayAccessData(psa, (void**)&str); + hr = SafeArrayAccessData(psa, (void**)&str); + if (FAILED(hr)) + { + This->error = hr; + WARN("failed to access array data, 0x%08x\n", hr); + break; + } SafeArrayGetUBound(psa, 1, &len); if ((xmldoc = doparse(This, str, ++len, XML_CHAR_ENCODING_UTF8))) -- 2.11.4.GIT