Jacek Caban : mshtml: Don't try to null terminate post data if it' s not available.

Alexandre Julliard julliard at wine.codeweavers.com
Fri Nov 21 09:11:39 CST 2014


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

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Thu Nov 20 17:59:42 2014 +0100

mshtml: Don't try to null terminate post data if it's not available.

---

 dlls/mshtml/navigate.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dlls/mshtml/navigate.c b/dlls/mshtml/navigate.c
index 39f298f..85e47aa 100644
--- a/dlls/mshtml/navigate.c
+++ b/dlls/mshtml/navigate.c
@@ -902,7 +902,8 @@ static HRESULT read_post_data_stream(nsIInputStream *stream, BOOL contains_heade
         post_data = new_data;
     }
 
-    post_data[data_len] = 0;
+    if(post_data)
+        post_data[data_len] = 0;
     request_data->post_data = post_data;
     request_data->post_data_len = data_len;
     TRACE("post_data = %s\n", debugstr_an(request_data->post_data, request_data->post_data_len));




More information about the wine-cvs mailing list