Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/winegstreamer/main.c | 2 +- dlls/winegstreamer/unixlib.h | 2 +- dlls/winegstreamer/wg_parser.c | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/dlls/winegstreamer/main.c b/dlls/winegstreamer/main.c index 37752a3078b..10f71e6c303 100644 --- a/dlls/winegstreamer/main.c +++ b/dlls/winegstreamer/main.c @@ -224,7 +224,7 @@ bool wg_parser_stream_copy_buffer(wg_parser_stream_t stream, struct wg_parser_stream_copy_buffer_params params = { .stream = stream, - .data = data, + .data_ptr = u64_from_user_ptr(data), .offset = offset, .size = size, }; diff --git a/dlls/winegstreamer/unixlib.h b/dlls/winegstreamer/unixlib.h index 6280b3427d2..01004aaffc7 100644 --- a/dlls/winegstreamer/unixlib.h +++ b/dlls/winegstreamer/unixlib.h @@ -216,7 +216,7 @@ struct wg_parser_stream_get_event_params struct wg_parser_stream_copy_buffer_params { wg_parser_stream_t stream; - void *data; + ULONGLONG data_ptr; UINT32 offset; UINT32 size; }; diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c index 1a4185a63b4..e661ea9bee9 100644 --- a/dlls/winegstreamer/wg_parser.c +++ b/dlls/winegstreamer/wg_parser.c @@ -711,6 +711,7 @@ static NTSTATUS wg_parser_stream_copy_buffer(void *args) { const struct wg_parser_stream_copy_buffer_params *params = args; struct wg_parser_stream *stream = get_wg_parser_stream(params->stream); + void *data = u64_to_user_ptr(params->data_ptr); struct wg_parser *parser = stream->parser; uint32_t offset = params->offset; uint32_t size = params->size; @@ -726,7 +727,7 @@ static NTSTATUS wg_parser_stream_copy_buffer(void *args) assert(stream->event.type == WG_PARSER_EVENT_BUFFER); assert(offset < stream->map_info.size); assert(offset + size <= stream->map_info.size); - memcpy(params->data, stream->map_info.data + offset, size); + memcpy(data, stream->map_info.data + offset, size);
pthread_mutex_unlock(&parser->mutex); return S_OK;