aboutsummaryrefslogtreecommitdiff
path: root/system/lxterminal
diff options
context:
space:
mode:
Diffstat (limited to 'system/lxterminal')
-rw-r--r--system/lxterminal/fix_use-after-free.patch34
-rw-r--r--system/lxterminal/lxterminal.SlackBuild10
-rw-r--r--system/lxterminal/lxterminal.info6
3 files changed, 44 insertions, 6 deletions
diff --git a/system/lxterminal/fix_use-after-free.patch b/system/lxterminal/fix_use-after-free.patch
new file mode 100644
index 0000000000..d9ac70f2ff
--- /dev/null
+++ b/system/lxterminal/fix_use-after-free.patch
@@ -0,0 +1,34 @@
+From 3fa3a935bdacbcedccf51bea4b8b3c0a396b10ee Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ingo=20Br=C3=BCckl?= <ib@oddnet.de>
+Date: Tue, 15 Apr 2025 17:48:10 +0200
+Subject: [PATCH] Prevent access to terminal data after it has been freed
+
+After the last terminal child (tab) exits, all terminal data is freed.
+Checking whether the number of terminal tabs is zero is a use-after-free
+access.
+
+This fixes github issue #131, reported by mtasaka.
+---
+ src/lxterminal.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/src/lxterminal.c b/src/lxterminal.c
+index 5148b75..18ac81a 100644
+--- a/src/lxterminal.c
++++ b/src/lxterminal.c
+@@ -478,12 +478,14 @@ static void terminal_close_tab_activate_event(GtkAction * action, LXTerminal * t
+ * Close the current window. */
+ static void terminal_close_window_activate_event(GtkAction * action, LXTerminal * terminal)
+ {
++ guint len;
++
+ if (!terminal_close_window_confirmation_dialog(terminal)) {
+ return;
+ }
+
+ /* Play it safe and delete tabs one by one. */
+- while(terminal->terms->len > 0) {
++ for (len = terminal->terms->len; len; len--) {
+ Term *term = g_ptr_array_index(terminal->terms, 0);
+ #if VTE_CHECK_VERSION (0, 38, 0)
+ terminal_child_exited_event(VTE_TERMINAL(term->vte), 0, term);
diff --git a/system/lxterminal/lxterminal.SlackBuild b/system/lxterminal/lxterminal.SlackBuild
index 6f4515229e..5521c27a5f 100644
--- a/system/lxterminal/lxterminal.SlackBuild
+++ b/system/lxterminal/lxterminal.SlackBuild
@@ -1,7 +1,7 @@
#!/bin/bash
# $Id: lxterminal.SlackBuild,v 1.6 2009/09/11 10:43:05 root Exp root $
# Copyright (c) 2008-2009 Eric Hameleers, Eindhoven, NL
-# Copyright (c) 2010-2024 Matteo Bernardini, Pisa, IT
+# Copyright (c) 2010-2025 Matteo Bernardini, Pisa, IT
# All rights reserved.
#
# Permission to use, copy, modify, and distribute this software for
@@ -71,6 +71,8 @@
# * Update.
# 0.4.0-2: 24/apr/2024 by Matteo Bernardini <ponce@slackbuilds.org>
# * Switch to gtk+3.
+# 0.4.1-1: 30/apr/2025 by Matteo Bernardini <ponce@slackbuilds.org>
+# * Update.
#
# Run 'sh lxterminal.SlackBuild' to build a Slackware package.
# The package is created in /tmp .
@@ -81,8 +83,8 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=lxterminal
-VERSION=${VERSION:-0.4.0}
-BUILD=${BUILD:-2}
+VERSION=${VERSION:-0.4.1}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -136,6 +138,8 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+patch -p1 < $CWD/fix_use-after-free.patch
+
sh autogen.sh || true
CXXFLAGS="$SLKCFLAGS" \
diff --git a/system/lxterminal/lxterminal.info b/system/lxterminal/lxterminal.info
index d8fecdbf39..823692c1ee 100644
--- a/system/lxterminal/lxterminal.info
+++ b/system/lxterminal/lxterminal.info
@@ -1,8 +1,8 @@
PRGNAM="lxterminal"
-VERSION="0.4.0"
+VERSION="0.4.1"
HOMEPAGE="https://wiki.lxde.org/en/LXTerminal"
-DOWNLOAD="http://downloads.sf.net/lxde/lxterminal-0.4.0.tar.xz"
-MD5SUM="7938dbd50e3826c11f4735a742b278d3"
+DOWNLOAD="https://github.com/lxde/releases/raw/refs/heads/master/releases/lxterminal-0.4.1.tar.xz"
+MD5SUM="d902c430008e241cc2be060e8f7c3587"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""