Added a patch for tqt, solves the buffer overflow problem

Solution to problem #351, TDE/tqt3#100

Signed-off-by: ormorph <roma251078@mail.ru>
pull/352/head
ormorph 10 months ago
parent bbd4b5275b
commit 24b756f9e2
No known key found for this signature in database
GPG Key ID: 30407D7656623DFD

@ -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

@ -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

@ -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

Loading…
Cancel
Save