[Wine-patches] mshtml: Check parameter for NULL pointer

Konstantin Kondratyuk =?iso-8859-1?q?kondratyuk_=CE=C1_etersoft=2Eru?=
Пн Окт 20 17:11:06 MSD 2008


-- 
Best regards,
Konstantin Kondratyuk.
----------- следующая часть -----------
From 6819595ee65fbf7a6183da18de9550066d498905 Mon Sep 17 00:00:00 2001
From: Konstantin Kondratyuk <kondratyuk на etersoft.ru>
Date: Mon, 20 Oct 2008 16:52:51 +0400
Subject: [PATCH] mshtml: Check parameter for NULL pointer

---
 dlls/mshtml/htmldoc.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c
index 08c0471..1ff2046 100644
--- a/dlls/mshtml/htmldoc.c
+++ b/dlls/mshtml/htmldoc.c
@@ -773,6 +773,12 @@ static HRESULT WINAPI HTMLDocument_write(IHTMLDocument2 *iface, SAFEARRAY *psarr
 
     HTMLDocument_get_body(iface,&pbody);
 
+    if(!pbody)
+    {
+        FIXME("pbody is NULL, returning E_FAIL\n");
+        return E_FAIL;
+    }
+
     hres = IHTMLElement_get_innerHTML(pbody, &vtext);
     if (FAILED(hres)) {
         vtext = SysAllocString(L"");
-- 
1.5.6.5.GIT



Подробная информация о списке рассылки Wine-patches