From f34c37f3156d1578a53dccc582c83c88fff76f87 Mon Sep 17 00:00:00 2001 From: Tatsuya Kinoshita Date: Mon, 5 Dec 2016 01:22:21 +0900 Subject: Prevent negative array index for marks in HTMLlineproc2body() Bug-Debian: https://github.com/tats/w3m/issues/61 --- file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'file.c') 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; -- cgit v1.2.3