Skip to content

Commit

Permalink
wasm: Fix integer overflow in FetchRequest
Browse files Browse the repository at this point in the history
Remove code which is trying to unset flag that has never been set
before. Subtracting flag on unsigned int "attributes" can cause integer
overlow.

Fixes: QTBUG-128929
Pick-to: 6.5
Change-Id: I4128819f29a841b73b6a08aeba795dcae9dc2e51
Reviewed-by: Morten Johan Sørvig <[email protected]>
Reviewed-by: Mårten Nordheim <[email protected]>
(cherry picked from commit 21be400)
Reviewed-by: Qt Cherry-pick Bot <[email protected]>
(cherry picked from commit e9f1dd0)
  • Loading branch information
Piotr Wierciński authored and Qt Cherry-pick Bot committed Sep 19, 2024
1 parent 79f0a98 commit eed1302
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/network/access/qnetworkreplywasmimpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -282,11 +282,6 @@ void QNetworkReplyWasmImplPrivate::doSendRequest()
attr.attributes += EMSCRIPTEN_FETCH_APPEND;
}

if (CacheLoadControlAttribute == QNetworkRequest::AlwaysNetwork ||
request.attribute(QNetworkRequest::CacheSaveControlAttribute, false).toBool()) {
attr.attributes -= EMSCRIPTEN_FETCH_PERSIST_FILE;
}

attr.withCredentials = request.attribute(QNetworkRequest::UseCredentialsAttribute, false).toBool();
attr.onsuccess = QNetworkReplyWasmImplPrivate::downloadSucceeded;
attr.onerror = QNetworkReplyWasmImplPrivate::downloadFailed;
Expand Down

0 comments on commit eed1302

Please sign in to comment.