aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTatsuya Kinoshita <tats@debian.org>2014-12-06 07:55:04 +0000
committerTatsuya Kinoshita <tats@debian.org>2014-12-06 07:55:04 +0000
commitb76870629a5988282942d4487c8c7600e17e8296 (patch)
treefd914d37539434845ff88086fd95f557a28964fc
parentUpdate 800_lang-en.patch (diff)
downloadw3m-b76870629a5988282942d4487c8c7600e17e8296.tar.gz
w3m-b76870629a5988282942d4487c8c7600e17e8296.zip
New patch 410_textarea-segfault.patch to prevent segfault
Diffstat (limited to '')
-rw-r--r--debian/patches/410_textarea-segfault.patch22
-rw-r--r--debian/patches/series1
2 files changed, 23 insertions, 0 deletions
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 <poeml@suse.de>
+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
diff --git a/debian/patches/series b/debian/patches/series
index 02460df..0ebe702 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -39,6 +39,7 @@
380_tinfo.patch
390_gdk-pixbuf.patch
400_w3m-img-freebsd.patch
+410_textarea-segfault.patch
800_lang-en.patch
810_lang-de.patch
820_lang-ja.patch