summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorormorph <roma251078@mail.ru>2024-02-02 13:17:34 +0300
committerSlávek Banko <slavek.banko@axis.cz>2024-02-02 13:42:45 +0100
commitb09fdd31aa555addfe87d14225d65dd3e82a9b09 (patch)
treef81f2faefc686430a786cb9a151b4ab6058177a0
parent2f5fc73100522e48947c3ed0171da6789cece6e8 (diff)
downloadtde-packaging-gentoo-b09fdd31aa555addfe87d14225d65dd3e82a9b09.tar.gz
tde-packaging-gentoo-b09fdd31aa555addfe87d14225d65dd3e82a9b09.zip
Added a patch for tqt, solves the buffer overflow problem
Solution to problem #351, TDE/tqt3#100 Signed-off-by: ormorph <roma251078@mail.ru> (cherry picked from commit 24b756f9e2a24bd46f144fc99796fa0fba9a0c62)
-rw-r--r--dev-tqt/tqt/files/tqt-buffer.patch29
-rw-r--r--dev-tqt/tqt/tqt-14.1.0.ebuild3
-rw-r--r--dev-tqt/tqt/tqt-14.1.1.ebuild7
3 files changed, 37 insertions, 2 deletions
diff --git a/dev-tqt/tqt/files/tqt-buffer.patch b/dev-tqt/tqt/files/tqt-buffer.patch
new file mode 100644
index 00000000..abe642c3
--- /dev/null
+++ b/dev-tqt/tqt/files/tqt-buffer.patch
@@ -0,0 +1,29 @@
+--- a/src/tools/qglobal.cpp
++++ b/src/tools/qglobal.cpp
+@@ -520,7 +520,7 @@ void tqDebug( const char *msg, ... )
+ va_list ap;
+ va_start( ap, msg ); // use variable arg list
+ #if defined(QT_VSNPRINTF)
+- QT_VSNPRINTF( &buf[len], QT_BUFFER_LENGTH, msg, ap );
++ QT_VSNPRINTF( &buf[len], QT_BUFFER_LENGTH-len, msg, ap );
+ #else
+ vsprintf( &buf[len], msg, ap );
+ #endif
+@@ -555,7 +555,7 @@ void tqWarning( const char *msg, ... )
+ va_list ap;
+ va_start( ap, msg ); // use variable arg list
+ #if defined(QT_VSNPRINTF)
+- QT_VSNPRINTF( &buf[len], QT_BUFFER_LENGTH, msg, ap );
++ QT_VSNPRINTF( &buf[len], QT_BUFFER_LENGTH-len, msg, ap );
+ #else
+ vsprintf( &buf[len], msg, ap );
+ #endif
+@@ -590,7 +590,7 @@ void tqFatal( const char *msg, ... )
+ va_list ap;
+ va_start( ap, msg ); // use variable arg list
+ #if defined(QT_VSNPRINTF)
+- QT_VSNPRINTF( &buf[len], QT_BUFFER_LENGTH, msg, ap );
++ QT_VSNPRINTF( &buf[len], QT_BUFFER_LENGTH-len, msg, ap );
+ #else
+ vsprintf( &buf[len], msg, ap );
+ #endif
diff --git a/dev-tqt/tqt/tqt-14.1.0.ebuild b/dev-tqt/tqt/tqt-14.1.0.ebuild
index 93379b6b..f1dec6aa 100644
--- a/dev-tqt/tqt/tqt-14.1.0.ebuild
+++ b/dev-tqt/tqt/tqt-14.1.0.ebuild
@@ -64,7 +64,6 @@ RDEPEND="
DEPEND="${RDEPEND}
x11-base/xorg-proto
"
-
pkg_setup() {
if use imext; then
ewarn
@@ -111,6 +110,8 @@ pkg_setup() {
}
src_prepare() {
+ # Solution to problem #351, TDE/tqt3#100
+ eapply "${FILESDIR}/${PN}-buffer.patch"
# Apply user-provided patches
eapply_user
diff --git a/dev-tqt/tqt/tqt-14.1.1.ebuild b/dev-tqt/tqt/tqt-14.1.1.ebuild
index ba9cd379..508ad7dc 100644
--- a/dev-tqt/tqt/tqt-14.1.1.ebuild
+++ b/dev-tqt/tqt/tqt-14.1.1.ebuild
@@ -31,6 +31,10 @@ REQUIRED_USE="mysql? ( !mariadb )"
# Don't use Gentoo mirrors
RESTRICT="mirror"
+PATCHES=(
+ "${FILESDIR}"/${PN}-buffer.patch
+)
+
RDEPEND="
media-libs/freetype
media-libs/libpng:=
@@ -65,7 +69,6 @@ RDEPEND="
DEPEND="${RDEPEND}
x11-base/xorg-proto
"
-
pkg_setup() {
if use imext; then
ewarn
@@ -112,6 +115,8 @@ pkg_setup() {
}
src_prepare() {
+ # Solution to problem #351, TDE/tqt3#100
+ eapply "${FILESDIR}/${PN}-buffer.patch"
# Apply user-provided patches
eapply_user