Prevent heap-use-after-free read in HTMLlineproc0()

Bug-Debian: https://github.com/tats/w3m/issues/81
This commit is contained in:
Tatsuya Kinoshita
2016-12-18 01:20:14 +09:00
parent 7a2675b4a5
commit aa2077e06f

2
file.c
View File

@@ -6356,7 +6356,7 @@ HTMLlineproc0(char *line, struct html_feed_environ *h_env, int internal)
}
if (h_env->tagbuf->length == 0)
continue;
str = h_env->tagbuf->ptr;
str = Strdup(h_env->tagbuf)->ptr;
if (*str == '<') {
if (str[1] && REALLY_THE_BEGINNING_OF_A_TAG(str))
is_tag = TRUE;