Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
diff --git a/src/linguist/shared/qm.cpp b/src/linguist/shared/qm.cpp
index 8c3fc3f..d772855 100644
--- a/src/linguist/shared/qm.cpp
+++ b/src/linguist/shared/qm.cpp
@@ -552,12 +552,17 @@ bool loadQM(Translator &translator, QIODevice &dev, ConversionData &cd)
goto end;
case Tag_Translation: {
int len = read32(m);
- if (len & 1) {
+ m += 4;
+
+ // -1 indicates an empty string
+ // Otherwise streaming format is UTF-16 -> 2 bytes per character
+ if ((len != -1) && (len & 1)) {
cd.appendError(QLatin1String("QM-Format error"));
return false;
}
- m += 4;
- QString str = QString((const QChar *)m, len/2);
+ QString str;
+ if (len != -1)
+ str = QString((const QChar *)m, len / 2);
if (QSysInfo::ByteOrder == QSysInfo::LittleEndian) {
for (int i = 0; i < str.length(); ++i)
str[i] = QChar((str.at(i).unicode() >> 8) +
1 change: 1 addition & 0 deletions ports/qt5-tools/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake)

qt_submodule_installation(PATCHES
icudt-debug-suffix.patch # https://bugreports.qt.io/browse/QTBUG-87677
Fix-regression-in-lconvert-handling-empty-translations.patch # https://codereview.qt-project.org/c/qt/qttools/+/337738
)

if(EXISTS "${CURRENT_INSTALLED_DIR}/plugins/platforms/qminimal${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}")
Expand Down
1 change: 1 addition & 0 deletions ports/qt5-tools/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "qt5-tools",
"version": "5.15.4",
"port-version": 1,
"description": "Qt5 Tools Module; Includes deployment tools and helpers, Qt Designer, Assistant, and other applications",
"license": null,
"dependencies": [
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -5830,7 +5830,7 @@
},
"qt5-tools": {
"baseline": "5.15.4",
"port-version": 0
"port-version": 1
},
"qt5-translations": {
"baseline": "5.15.4",
Expand Down
5 changes: 5 additions & 0 deletions versions/q-/qt5-tools.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "6025c1997ce5b8bf0ebb131b0628641e8e550d6d",
"version": "5.15.4",
"port-version": 1
},
{
"git-tree": "b8a761a89f1f3aabb2c3e990b40cc69d0b7ea543",
"version": "5.15.4",
Expand Down