diff options
Diffstat (limited to 'vcpkg/ports/qt5-base/patches/CVE-2025-5455-qtbase-5.15.patch')
| -rw-r--r-- | vcpkg/ports/qt5-base/patches/CVE-2025-5455-qtbase-5.15.patch | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/vcpkg/ports/qt5-base/patches/CVE-2025-5455-qtbase-5.15.patch b/vcpkg/ports/qt5-base/patches/CVE-2025-5455-qtbase-5.15.patch new file mode 100644 index 0000000..9cee864 --- /dev/null +++ b/vcpkg/ports/qt5-base/patches/CVE-2025-5455-qtbase-5.15.patch @@ -0,0 +1,20 @@ +diff --git a/src/corelib/io/qdataurl.cpp b/src/corelib/io/qdataurl.cpp +index f14d399301f..83e59e3ac00 100644 +--- a/src/corelib/io/qdataurl.cpp ++++ b/src/corelib/io/qdataurl.cpp +@@ -76,10 +76,11 @@ Q_CORE_EXPORT bool qDecodeDataUrl(const QUrl &uri, QString &mimeType, QByteArray + } + + if (data.toLower().startsWith("charset")) { +- int i = 7; // strlen("charset") +- while (data.at(i) == ' ') +- ++i; +- if (data.at(i) == '=') ++ int prefixSize = 7; // strlen("charset") ++ QLatin1String copy(data.constData() + prefixSize, data.size() - prefixSize); ++ while (copy.startsWith(QLatin1String(" "))) ++ copy = copy.mid(1); ++ if (copy.startsWith(QLatin1String("="))) + data.prepend("text/plain;"); + } + |