Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.5:Update
qt6-base.35115
0002-wasm-Dont-access-QNetworkReply-header-data...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0002-wasm-Dont-access-QNetworkReply-header-data-through-dangling.patch of Package qt6-base.35115
From a5b00cefef12999e9a213943855abe6bc0ab5365 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Piotr=20Wierci=C5=84ski?= <piotr.wiercinski@qt.io> Date: Thu, 29 Feb 2024 16:53:07 +0100 Subject: [PATCH] wasm: Dont access QNetworkReply header data through dangling pointer Fixes: QTBUG-122893 Pick-to: 6.5 6.6 6.7 Change-Id: I3768fdffaec7be4ec0b559fdb365600220e648d1 Reviewed-by: Lorn Potter <lorn.potter@gmail.com> --- src/corelib/kernel/qeventdispatcher_wasm_p.h | 2 +- src/network/access/qnetworkreplywasmimpl.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/corelib/kernel/qeventdispatcher_wasm_p.h b/src/corelib/kernel/qeventdispatcher_wasm_p.h index 372be88a1ca8..cf718a151b52 100644 --- a/src/corelib/kernel/qeventdispatcher_wasm_p.h +++ b/src/corelib/kernel/qeventdispatcher_wasm_p.h @@ -54,6 +54,7 @@ public: void interrupt() override; void wakeUp() override; + static void runOnMainThread(std::function<void(void)> fn); static void runOnMainThreadAsync(std::function<void(void)> fn); static void socketSelect(int timeout, int socket, bool waitForRead, bool waitForWrite, bool *selectForRead, bool *selectForWrite, bool *socketDisconnect); @@ -96,7 +97,6 @@ private: # bool *selectForRead, bool *selectForWrite, bool *socketDisconnect); # # static void run(std::function<void(void)> fn); static void run(std::function<void(void)> fn); static void runAsync(std::function<void(void)> fn); - static void runOnMainThread(std::function<void(void)> fn); static QEventDispatcherWasm *g_mainThreadEventDispatcher; # static void runAsync(std::function<void(void)> fn); # # static QEventDispatcherWasm *g_mainThreadEventDispatcher; diff --git a/src/network/access/qnetworkreplywasmimpl.cpp b/src/network/access/qnetworkreplywasmimpl.cpp index f7380a10d9de..eb3e50dec86b 100644 --- a/src/network/access/qnetworkreplywasmimpl.cpp +++ b/src/network/access/qnetworkreplywasmimpl.cpp @@ -297,7 +297,7 @@ void QNetworkReplyWasmImplPrivate::doSendRequest() attr.destinationPath = destinationPath.constData(); auto url = request.url().toString().toUtf8(); - QEventDispatcherWasm::runOnMainThreadAsync([attr, url]() mutable { + QEventDispatcherWasm::runOnMainThread([attr, url]() mutable { emscripten_fetch(&attr, url); }); state = Working; -- 2.16.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor