aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTatsuya Kinoshita <tats@debian.org>2016-12-04 16:22:21 +0000
committerTatsuya Kinoshita <tats@debian.org>2016-12-05 12:48:20 +0000
commitf34c37f3156d1578a53dccc582c83c88fff76f87 (patch)
treee70771a6b30c3061adb688eb3091e34d555865f3
parentPrevent negative value of row for pushTable() in HTMLlineproc0() (diff)
downloadw3m-f34c37f3156d1578a53dccc582c83c88fff76f87.tar.gz
w3m-f34c37f3156d1578a53dccc582c83c88fff76f87.zip
Prevent negative array index for marks in HTMLlineproc2body()
Bug-Debian: https://github.com/tats/w3m/issues/61
Diffstat (limited to '')
-rw-r--r--file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/file.c b/file.c
index 5102c77..ee72a87 100644
--- a/file.c
+++ b/file.c
@@ -5727,7 +5727,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;