From b76870629a5988282942d4487c8c7600e17e8296 Mon Sep 17 00:00:00 2001 From: Tatsuya Kinoshita Date: Sat, 6 Dec 2014 16:55:04 +0900 Subject: New patch 410_textarea-segfault.patch to prevent segfault --- debian/patches/410_textarea-segfault.patch | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 debian/patches/410_textarea-segfault.patch (limited to 'debian/patches/410_textarea-segfault.patch') diff --git a/debian/patches/410_textarea-segfault.patch b/debian/patches/410_textarea-segfault.patch new file mode 100644 index 0000000..5322c75 --- /dev/null +++ b/debian/patches/410_textarea-segfault.patch @@ -0,0 +1,22 @@ +Subject: Prevent segfault when editing a textarea field with vi +Author: Peter Poeml +Origin: https://build.opensuse.org/package/view_file/openSUSE:Factory/w3m/w3m-0.4.1-textarea-segfault.dif?expand=1 + + add fix for segfault that can occur when editing a textarea field + with vi, and returning to w3m (it seems to happen if the terminal + is not writable, as when using w3m after 'su - some_user') + +diff --git a/terms.c b/terms.c +index ca81d28..672262c 100644 +--- a/terms.c ++++ b/terms.c +@@ -637,7 +637,8 @@ reset_tty(void) + writestr(T_se); /* reset terminal */ + flush_tty(); + TerminalSet(tty, &d_ioval); +- close_tty(); ++ if (tty != 2) ++ close_tty(); + } + + static MySignalHandler -- cgit v1.2.3