Hi Jacek,

It seems http://bugs.winehq.org/show_bug.cgi?id=25999  has no update
from Wine developers,
my friend Zhuo Wei has write a patch for it, tests in
dlls/mshtml/tests are run on Wine,
( according to http://www.winehq.org/docs/winedev-guide/testing-wine
), every test passes
successfully, could you help to review it ?

Thanks a lot!


>From c5ee98396123c6cccdd295025a6b5aceb87dc0f7 Mon Sep 17 00:00:00 2001
From: Zhuo Wei <[email protected]>
Date: Mon, 7 Mar 2011 23:58:09 +0800
Subject: Make sure This->bsc.doc will be initialized while opening a zero
 byte html file, fix bug 25999 .
        modified:   dlls/mshtml/navigate.c

---
 dlls/mshtml/navigate.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/dlls/mshtml/navigate.c b/dlls/mshtml/navigate.c
index bb71c79..0e7a298 100644
--- a/dlls/mshtml/navigate.c
+++ b/dlls/mshtml/navigate.c
@@ -985,8 +985,6 @@ static HRESULT read_stream_data(nsChannelBSC
*This, IStream *stream)
         read = 0;
         hres = IStream_Read(stream,
This->nsstream->buf+This->nsstream->buf_size,
                 sizeof(This->nsstream->buf)-This->nsstream->buf_size, &read);
-        if(!read)
-            break;

         This->nsstream->buf_size += read;

@@ -1014,6 +1012,9 @@ static HRESULT read_stream_data(nsChannelBSC
*This, IStream *stream)
             on_start_nsrequest(This);
         }

+        if(!read)
+            break;
+
         This->bsc.readed += This->nsstream->buf_size;

         nsres = nsIStreamListener_OnDataAvailable(This->nslistener,
-- 
1.7.1


-- 
Regards,
Qian Hong
-
Sent from Ubuntu
http://www.ubuntu.com/
From c5ee98396123c6cccdd295025a6b5aceb87dc0f7 Mon Sep 17 00:00:00 2001
From: Zhuo Wei <[email protected]>
Date: Mon, 7 Mar 2011 23:58:09 +0800
Subject: Make sure This->bsc.doc will be initialized while opening a zero
 byte html file, fix bug 25999 .
        modified:   dlls/mshtml/navigate.c

---
 dlls/mshtml/navigate.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/dlls/mshtml/navigate.c b/dlls/mshtml/navigate.c
index bb71c79..0e7a298 100644
--- a/dlls/mshtml/navigate.c
+++ b/dlls/mshtml/navigate.c
@@ -985,8 +985,6 @@ static HRESULT read_stream_data(nsChannelBSC *This, IStream 
*stream)
         read = 0;
         hres = IStream_Read(stream, 
This->nsstream->buf+This->nsstream->buf_size,
                 sizeof(This->nsstream->buf)-This->nsstream->buf_size, &read);
-        if(!read)
-            break;
 
         This->nsstream->buf_size += read;
 
@@ -1014,6 +1012,9 @@ static HRESULT read_stream_data(nsChannelBSC *This, 
IStream *stream)
             on_start_nsrequest(This);
         }
 
+        if(!read)
+            break;
+
         This->bsc.readed += This->nsstream->buf_size;
 
         nsres = nsIStreamListener_OnDataAvailable(This->nslistener,
-- 
1.7.1



Reply via email to