diff options
Diffstat (limited to 'user/qt5-qtmultimedia')
-rw-r--r-- | user/qt5-qtmultimedia/APKBUILD | 13 | ||||
-rw-r--r-- | user/qt5-qtmultimedia/kde-lts.patch | 64 |
2 files changed, 72 insertions, 5 deletions
diff --git a/user/qt5-qtmultimedia/APKBUILD b/user/qt5-qtmultimedia/APKBUILD index 262152418..db4dd82c7 100644 --- a/user/qt5-qtmultimedia/APKBUILD +++ b/user/qt5-qtmultimedia/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=qt5-qtmultimedia -_pkgname=qtmultimedia-everywhere-src -pkgver=5.12.9 +_pkgname=qtmultimedia-everywhere +pkgver=5.15.4 pkgrel=0 pkgdesc="Audio, video, radio, and camera libraries for Qt 5" url="https://www.qt.io/" @@ -11,8 +11,10 @@ depends="" makedepends="alsa-lib-dev gstreamer-dev gst-plugins-base-dev libxv-dev pulseaudio-dev qt5-qtbase-dev qt5-qtdeclarative-dev xorgproto-dev" subpackages="$pkgname-dev" -source="https://download.qt.io/official_releases/qt/${pkgver%.*}/$pkgver/submodules/$_pkgname-$pkgver.tar.xz" -builddir="$srcdir"/$_pkgname-$pkgver +source="https://download.qt.io/official_releases/qt/${pkgver%.*}/$pkgver/submodules/$_pkgname-opensource-src-$pkgver.tar.xz + kde-lts.patch + " +builddir="$srcdir"/$_pkgname-src-$pkgver build() { qmake @@ -26,4 +28,5 @@ package() { make install INSTALL_ROOT="$pkgdir" } -sha512sums="add2115e3bc69027778d4cc995c692f9c4b401a7852a2080151da36c149aee99e3032cc9823471e3e2296f16dcc7942c9348bb5a8c81b56445a7958266decabb qtmultimedia-everywhere-src-5.12.9.tar.xz" +sha512sums="bb0ada7560093b89751b5b3c0e1a573de215a388d621d356bc3c0e1acfffc2d696230c67b7a7cef037b18c4da900c7eb3d315bd2e73ce12f9aedd0e340399117 qtmultimedia-everywhere-opensource-src-5.15.4.tar.xz +8b34b7bc7f6ecaeca3795a20986d31650a1aededb69a46e718545ea2f2a4bd65673167e41645d1b6f34e21e583f9613a1903ae8e116d0e6088de0f8a1e0256c5 kde-lts.patch" diff --git a/user/qt5-qtmultimedia/kde-lts.patch b/user/qt5-qtmultimedia/kde-lts.patch new file mode 100644 index 000000000..510e88d18 --- /dev/null +++ b/user/qt5-qtmultimedia/kde-lts.patch @@ -0,0 +1,64 @@ +From c75ef0bb53562a62d67fb3247c9fc138356368b4 Mon Sep 17 00:00:00 2001 +From: Marc Mutz <marc.mutz@qt.io> +Date: Thu, 19 May 2022 12:02:04 +0200 +Subject: [PATCH] QPulseAudioSource: fix UB (memcpy() called with nullptr dest) + in read() + +deviceReady() calls read(nullptr, 0), but calling memcpy() with a +nullpt destination is UB, even if the length is simulateneously zero. + +Ditto applyVolume() (called from read()). + +Fix by guarding the memcpy() calls. + +Add assertions to indicate that for these functions, nullptr is valid +input iff length is zero. + +Found by clangsa's core.NonNullParamChecker. + +Pick-to: 6.3 6.2 5.15 +Change-Id: I9006b0e933e196a7a212e0ebe2bd27f6b9552518 +Reviewed-by: Rafael Roquetto <rafael.roquetto@qt.io> +(cherry picked from commit 8df415d5bcf23462bedb4cb7601b909851ee15dd) +--- + src/plugins/pulseaudio/qaudioinput_pulse.cpp | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/src/plugins/pulseaudio/qaudioinput_pulse.cpp b/src/plugins/pulseaudio/qaudioinput_pulse.cpp +index 2b5325132..b68b4af1b 100644 +--- a/src/plugins/pulseaudio/qaudioinput_pulse.cpp ++++ b/src/plugins/pulseaudio/qaudioinput_pulse.cpp +@@ -402,6 +402,8 @@ int QPulseAudioInput::bytesReady() const + + qint64 QPulseAudioInput::read(char *data, qint64 len) + { ++ Q_ASSERT(data != nullptr || len == 0); ++ + m_bytesAvailable = checkBytesReady(); + + setError(QAudio::NoError); +@@ -411,7 +413,8 @@ qint64 QPulseAudioInput::read(char *data, qint64 len) + + if (!m_pullMode && !m_tempBuffer.isEmpty()) { + readBytes = qMin(static_cast<int>(len), m_tempBuffer.size()); +- memcpy(data, m_tempBuffer.constData(), readBytes); ++ if (readBytes) ++ memcpy(data, m_tempBuffer.constData(), readBytes); + m_totalTimeValue += readBytes; + + if (readBytes < m_tempBuffer.size()) { +@@ -502,9 +505,10 @@ qint64 QPulseAudioInput::read(char *data, qint64 len) + + void QPulseAudioInput::applyVolume(const void *src, void *dest, int len) + { ++ Q_ASSERT((src && dest) || len == 0); + if (m_volume < 1.f) + QAudioHelperInternal::qMultiplySamples(m_volume, m_format, src, dest, len); +- else ++ else if (len) + memcpy(dest, src, len); + } + +-- +2.36.0 + |