Nikolay Sivov : msxml3: Handle SafeArrayAccessData() failure in load() ( Coverity).

Alexandre Julliard julliard at wine.codeweavers.com
Mon Jun 15 08:49:08 CDT 2015


Module: wine
Branch: master
Commit: cfe52abcf46a9a36fc9ecb920df65bf98f199dfa
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=cfe52abcf46a9a36fc9ecb920df65bf98f199dfa

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Sun Jun 14 17:39:42 2015 +0300

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 e081f1a..8344f36 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)))




More information about the wine-cvs mailing list