diff options
author | ormorph <[email protected]> | 2024-02-02 13:17:34 +0300 |
---|---|---|
committer | ormorph <[email protected]> | 2024-02-02 15:41:03 +0300 |
commit | 24b756f9e2a24bd46f144fc99796fa0fba9a0c62 (patch) | |
tree | f81f2faefc686430a786cb9a151b4ab6058177a0 | |
parent | bbd4b5275b35a40309b56170bb9cccc7287dc164 (diff) | |
download | tde-packaging-gentoo-24b756f9e2a24bd46f144fc99796fa0fba9a0c62.tar.gz tde-packaging-gentoo-24b756f9e2a24bd46f144fc99796fa0fba9a0c62.zip |
Added a patch for tqt, solves the buffer overflow problem
Solution to problem #351, TDE/tqt3#100
Signed-off-by: ormorph <[email protected]>
-rw-r--r-- | dev-tqt/tqt/files/tqt-buffer.patch | 29 | ||||
-rw-r--r-- | dev-tqt/tqt/tqt-14.1.0.ebuild | 3 | ||||
-rw-r--r-- | dev-tqt/tqt/tqt-14.1.1.ebuild | 7 |
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 |