Commit 57f36261 authored by Misha Koshelev's avatar Misha Koshelev Committed by Alexandre Julliard

urlmon: Fix PROTOCOLDATA message passing in IInternetProtocolSink interface of Binding.

parent 0a158e7a
...@@ -622,14 +622,14 @@ static ULONG WINAPI InternetProtocolSink_Release(IInternetProtocolSink *iface) ...@@ -622,14 +622,14 @@ static ULONG WINAPI InternetProtocolSink_Release(IInternetProtocolSink *iface)
typedef struct { typedef struct {
task_header_t header; task_header_t header;
PROTOCOLDATA *data; PROTOCOLDATA data;
} switch_task_t; } switch_task_t;
static void switch_proc(Binding *binding, task_header_t *t) static void switch_proc(Binding *binding, task_header_t *t)
{ {
switch_task_t *task = (switch_task_t*)t; switch_task_t *task = (switch_task_t*)t;
IInternetProtocol_Continue(binding->protocol, task->data); IInternetProtocol_Continue(binding->protocol, &task->data);
HeapFree(GetProcessHeap(), 0, task); HeapFree(GetProcessHeap(), 0, task);
} }
...@@ -643,7 +643,7 @@ static HRESULT WINAPI InternetProtocolSink_Switch(IInternetProtocolSink *iface, ...@@ -643,7 +643,7 @@ static HRESULT WINAPI InternetProtocolSink_Switch(IInternetProtocolSink *iface,
TRACE("(%p)->(%p)\n", This, pProtocolData); TRACE("(%p)->(%p)\n", This, pProtocolData);
task = HeapAlloc(GetProcessHeap(), 0, sizeof(switch_task_t)); task = HeapAlloc(GetProcessHeap(), 0, sizeof(switch_task_t));
task->data = pProtocolData; memcpy(&task->data, pProtocolData, sizeof(PROTOCOLDATA));
push_task(This, &task->header, switch_proc); push_task(This, &task->header, switch_proc);
......
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