aboutsummaryrefslogtreecommitdiffstats
path: root/debian/patches
diff options
context:
space:
mode:
authorTatsuya Kinoshita <tats@debian.org>2016-11-21 15:16:49 +0000
committerTatsuya Kinoshita <tats@debian.org>2016-11-21 15:16:49 +0000
commit6b005be323e5c0896b01c36a4bfceb90fbe785d3 (patch)
tree56a709e98da40e0f086eda8c904de465e7b6d31f /debian/patches
parentNew patch 928_form-id.patch to fix null deref (diff)
downloadw3m-6b005be323e5c0896b01c36a4bfceb90fbe785d3.tar.gz
w3m-6b005be323e5c0896b01c36a4bfceb90fbe785d3.zip
New patch 929_anchor.patch to fix null deref
Diffstat (limited to '')
-rw-r--r--debian/patches/929_anchor.patch18
-rw-r--r--debian/patches/series1
2 files changed, 19 insertions, 0 deletions
diff --git a/debian/patches/929_anchor.patch b/debian/patches/929_anchor.patch
new file mode 100644
index 0000000..87d0634
--- /dev/null
+++ b/debian/patches/929_anchor.patch
@@ -0,0 +1,18 @@
+Subject: Prevent deref null pointer in shiftAnchorPosition()
+Author: Tatsuya Kinoshita <tats@debian.org>
+Bug-Debian: https://github.com/tats/w3m/issues/40
+Origin: https://anonscm.debian.org/cgit/collab-maint/w3m.git/commit/?id=a088e0263c48ba406a7ae0932a1ae64a25be7acd
+
+diff --git a/anchor.c b/anchor.c
+index e006aea..ecb211d 100644
+--- a/anchor.c
++++ b/anchor.c
+@@ -551,7 +551,7 @@ shiftAnchorPosition(AnchorList *al, HmarkerList *hl, int line, int pos,
+ break;
+ if (a->start.pos > pos) {
+ a->start.pos += shift;
+- if (hl->marks[a->hseq].line == line)
++ if (hl && hl->marks && hl->marks[a->hseq].line == line)
+ hl->marks[a->hseq].pos = a->start.pos;
+ }
+ if (a->end.pos >= pos)
diff --git a/debian/patches/series b/debian/patches/series
index 60e9ec8..77f5ec7 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -64,3 +64,4 @@
926_indent-level.patch
927_symbol.patch
928_form-id.patch
+929_anchor.patch