diff options
author | Dmitry Shachnev <mitya57@gmail.com> | 2017-09-27 23:47:55 +0300 |
---|---|---|
committer | Dmitry Shachnev <mitya57@gmail.com> | 2017-09-27 23:47:55 +0300 |
commit | 9a8fe28c22580da8f59a67c962ea4c1dea98dbab (patch) | |
tree | 24bfe02fdb15f49633e1898d02451b88aa6aeff8 | |
parent | 6949971feffe5d919cbb3d138e3186c7921ba6b1 (diff) | |
download | qtbase-9a8fe28c22580da8f59a67c962ea4c1dea98dbab.tar.gz |
Backport upstream patch to fix crash in qglx_findConfig() function.
Closes: #841951.
-rw-r--r-- | debian/changelog | 3 | ||||
-rw-r--r-- | debian/patches/qglxconvenience_nullptr.diff | 25 | ||||
-rw-r--r-- | debian/patches/series | 1 |
3 files changed, 29 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index d9f3365..798d6fa 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,8 @@ qtbase-opensource-src (5.9.1+dfsg-11) UNRELEASED; urgency=medium + [ Dmitry Shachnev ] + * Backport upstream patch to fix crash in qglx_findConfig() function + (qglxconvenience_nullptr.diff, closes: #841951). -- Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org> Wed, 27 Sep 2017 23:45:09 +0300 diff --git a/debian/patches/qglxconvenience_nullptr.diff b/debian/patches/qglxconvenience_nullptr.diff new file mode 100644 index 0000000..9e4588f --- /dev/null +++ b/debian/patches/qglxconvenience_nullptr.diff @@ -0,0 +1,25 @@ +Description: qglxconvenience: avoid null pointer dereference +Origin: upstream, https://code.qt.io/cgit/qt/qtbase.git/commit/?id=3c59065d5cb5f82f +Last-Update: 2017-09-27 + +--- a/src/platformsupport/glxconvenience/qglxconvenience.cpp ++++ b/src/platformsupport/glxconvenience/qglxconvenience.cpp +@@ -164,7 +164,8 @@ + template <class T> + struct QXlibScopedPointerDeleter { + static inline void cleanup(T *pointer) { +- XFree(pointer); ++ if (pointer) ++ XFree(pointer); + } + }; + +@@ -202,6 +203,8 @@ + GLXFBConfig candidate = configs[i]; + + QXlibPointer<XVisualInfo> visual(glXGetVisualFromFBConfig(display, candidate)); ++ if (visual.isNull()) ++ continue; + + const int actualRed = qPopulationCount(visual->red_mask); + const int actualGreen = qPopulationCount(visual->green_mask); diff --git a/debian/patches/series b/debian/patches/series index 3a414d6..b24bc33 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,5 +1,6 @@ # Backported from upstream. fix_atspi_condition.diff +qglxconvenience_nullptr.diff # Debian specific. gnukfreebsd.diff |