[neon/qt/qtbase/Neon/testing] debian: Backport patch to fix allocated memory of QByteArray returned by QIODevice::readLine.
Dmitry Shachnev
null at kde.org
Tue May 18 11:01:29 BST 2021
Git commit 0ac20d7b3b7f5b45841c28bf404f6354a4c4e2e3 by Dmitry Shachnev.
Committed on 20/02/2021 at 17:26.
Pushed by sitter into branch 'Neon/testing'.
Backport patch to fix allocated memory of QByteArray returned by QIODevice::readLine.
Closes: #982882.
M +3 -0 debian/changelog
A +21 -0 debian/patches/qiodevice_readline_memory.diff
M +1 -0 debian/patches/series
https://invent.kde.org/neon/qt/qtbase/commit/0ac20d7b3b7f5b45841c28bf404f6354a4c4e2e3
diff --git a/debian/changelog b/debian/changelog
index c871d3c..d96bb1e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,8 @@
qtbase-opensource-src (5.15.2+dfsg-5) UNRELEASED; urgency=medium
+ [ Dmitry Shachnev ]
+ * Backport upstream patch to fix allocated memory of QByteArray returned by
+ QIODevice::readLine (closes: #982882).
-- Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org> Sat, 20 Feb 2021 20:24:14 +0300
diff --git a/debian/patches/qiodevice_readline_memory.diff b/debian/patches/qiodevice_readline_memory.diff
new file mode 100644
index 0000000..4ce27af
--- /dev/null
+++ b/debian/patches/qiodevice_readline_memory.diff
@@ -0,0 +1,21 @@
+Description: fix allocated memory of QByteArray returned by QIODevice::readLine
+Origin: upstream, https://code.qt.io/cgit/qt/qtbase.git/commit/?id=6485b6d45ad165cf
+Last-Update: 2021-02-20
+
+--- a/src/corelib/io/qiodevice.cpp
++++ b/src/corelib/io/qiodevice.cpp
+@@ -1480,10 +1480,12 @@ QByteArray QIODevice::readLine(qint64 ma
+ } else
+ readBytes = readLine(result.data(), result.size());
+
+- if (readBytes <= 0)
++ if (readBytes <= 0) {
+ result.clear();
+- else
++ } else {
+ result.resize(readBytes);
++ result.squeeze();
++ }
+
+ return result;
+ }
diff --git a/debian/patches/series b/debian/patches/series
index 81118c8..4d33113 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,6 +2,7 @@
xcb_screens_uaf.patch
qnam_connect_memory_leak.diff
gcc_11_limits.diff
+qiodevice_readline_memory.diff
# Debian specific.
gnukfreebsd.diff
More information about the Neon-commits
mailing list