aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTatsuya Kinoshita <tats@debian.org>2016-11-21 13:29:54 +0000
committerTatsuya Kinoshita <tats@debian.org>2016-11-21 14:02:59 +0000
commitf8b7b087a19531a2b848adc9d2f48b99ff6980cd (patch)
tree50d48182a2dbdf452a38db7b6d2bc503c4c7c61e
parentNew patch 901_ucsmap.patch to fix array index (closes: #820162) (diff)
downloadw3m-f8b7b087a19531a2b848adc9d2f48b99ff6980cd.tar.gz
w3m-f8b7b087a19531a2b848adc9d2f48b99ff6980cd.zip
New patch 902_johab1.patch to fix array index (closes: #820373)
-rw-r--r--debian/patches/902_johab1.patch22
-rw-r--r--debian/patches/series1
2 files changed, 23 insertions, 0 deletions
diff --git a/debian/patches/902_johab1.patch b/debian/patches/902_johab1.patch
new file mode 100644
index 0000000..cd5d8a7
--- /dev/null
+++ b/debian/patches/902_johab1.patch
@@ -0,0 +1,22 @@
+Subject: Fix segfault on bogus text for wc_N_to_johab1
+Author: Tatsuya Kinoshita <tats@debian.org>
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=820373
+Origin: https://anonscm.debian.org/cgit/collab-maint/w3m.git/commit/?id=5a159af05d8556a3f9f8f1a42d8fc153ffbc9694
+
+diff --git a/libwc/johab.c b/libwc/johab.c
+index 8d587b8..498b1bb 100644
+--- a/libwc/johab.c
++++ b/libwc/johab.c
+@@ -160,9 +160,9 @@ wc_N_to_johab1(wc_uint32 code)
+ {
+ wc_uint32 a, b, c;
+
+- a = N_johab1_map[0][(code / 28) / 21];
+- b = N_johab1_map[1][(code / 28) % 21];
+- c = N_johab1_map[2][ code % 28 ];
++ a = N_johab1_map[0][(code / 28) / 21 & 0x1F];
++ b = N_johab1_map[1][(code / 28) % 21 & 0x1F];
++ c = N_johab1_map[2][ code % 28 & 0x1F];
+ return 0x8000 | (a << 10) | (b << 5) | c;
+ }
+
diff --git a/debian/patches/series b/debian/patches/series
index 1be21ad..72bd87c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -37,3 +37,4 @@
360_lang-de.patch
900_ChangeLog.patch
901_ucsmap.patch
+902_johab1.patch