aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authorTatsuya Kinoshita <tats@debian.org>2016-12-04 16:22:21 +0000
committerTatsuya Kinoshita <tats@debian.org>2017-01-06 13:03:20 +0000
commitf16c1282ce192dc4754317461dea53ff2ed4dc14 (patch)
tree3fcb4192960b0692faba7563b254442e066cd92b /file.c
parentPrevent negative value of row for pushTable() in HTMLlineproc0() (diff)
downloadw3m-f16c1282ce192dc4754317461dea53ff2ed4dc14.tar.gz
w3m-f16c1282ce192dc4754317461dea53ff2ed4dc14.zip
Prevent negative array index for marks in HTMLlineproc2body()
Bug-Debian: https://github.com/tats/w3m/issues/61 Origin: https://anonscm.debian.org/cgit/collab-maint/w3m.git/commit/?id=f34c37f3156d1578a53dccc582c83c88fff76f87
Diffstat (limited to 'file.c')
-rw-r--r--file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/file.c b/file.c
index 6850db1..c5aeb88 100644
--- a/file.c
+++ b/file.c
@@ -5699,7 +5699,7 @@ HTMLlineproc2body(Buffer *buf, Str (*feed) (), int llimit)
a_href->end.pos = pos;
if (a_href->start.line == a_href->end.line &&
a_href->start.pos == a_href->end.pos) {
- if (buf->hmarklist &&
+ if (buf->hmarklist && a_href->hseq >= 0 &&
a_href->hseq < buf->hmarklist->nmark)
buf->hmarklist->marks[a_href->hseq].invalid = 1;
a_href->hseq = -1;