Commit aa714ca1 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Correctly handle NULL nschannel in channelbsc_load_stream (Coverity).

parent 03aae9e4
...@@ -1142,12 +1142,16 @@ HRESULT channelbsc_load_stream(nsChannelBSC *bscallback, IStream *stream) ...@@ -1142,12 +1142,16 @@ HRESULT channelbsc_load_stream(nsChannelBSC *bscallback, IStream *stream)
{ {
HRESULT hres; HRESULT hres;
const char text_html[] = "text/html"; if(!bscallback->nschannel) {
ERR("NULL nschannel\n");
return E_FAIL;
}
add_nsrequest(bscallback); bscallback->nschannel->content_type = heap_strdupA("text/html");
if(!bscallback->nschannel->content_type)
return E_OUTOFMEMORY;
if(bscallback->nschannel) add_nsrequest(bscallback);
bscallback->nschannel->content_type = heap_strdupA(text_html);
hres = read_stream_data(bscallback, stream); hres = read_stream_data(bscallback, stream);
IBindStatusCallback_OnStopBinding(STATUSCLB(&bscallback->bsc), hres, ERROR_SUCCESS); IBindStatusCallback_OnStopBinding(STATUSCLB(&bscallback->bsc), hres, ERROR_SUCCESS);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment