diff options
author | Tatsuya Kinoshita <tats@debian.org> | 2016-11-21 15:09:11 +0000 |
---|---|---|
committer | Tatsuya Kinoshita <tats@debian.org> | 2016-11-21 15:09:11 +0000 |
commit | 2da361a6baf2eba652d88e00509b57a44a400c3b (patch) | |
tree | b0a2a60c63a92531fbd5efcadee3463eb185b58d | |
parent | New patch 924_curline.patch to fix near-null deref (diff) | |
download | w3m-2da361a6baf2eba652d88e00509b57a44a400c3b.tar.gz w3m-2da361a6baf2eba652d88e00509b57a44a400c3b.zip |
New patch 925_lineproc.patch to fix stack overflow
-rw-r--r-- | debian/patches/925_lineproc.patch | 45 | ||||
-rw-r--r-- | debian/patches/series | 1 |
2 files changed, 46 insertions, 0 deletions
diff --git a/debian/patches/925_lineproc.patch b/debian/patches/925_lineproc.patch new file mode 100644 index 0000000..b2626ed --- /dev/null +++ b/debian/patches/925_lineproc.patch @@ -0,0 +1,45 @@ +Subject: Prevent infinite recursion in HTMLlineproc0 +Author: Tatsuya Kinoshita <tats@debian.org> +Bug-Debian: https://github.com/tats/w3m/issues/36 +Origin: https://anonscm.debian.org/cgit/collab-maint/w3m.git/commit/?id=ff8510ab954ac5db478964351f6a78891c34f1d8 + +diff --git a/file.c b/file.c +index ecc1e2f..0cef9ff 100644 +--- a/file.c ++++ b/file.c +@@ -4909,13 +4909,13 @@ HTMLtagproc1(struct parsed_tag *tag, struct html_feed_environ *h_env) + #ifdef USE_IMAGE + i = 0; + if (parsedtag_get_value(tag, ATTR_TOP_MARGIN, &i)) { +- if (i > obuf->top_margin) +- obuf->top_margin = i; ++ if ((short)i > obuf->top_margin) ++ obuf->top_margin = (short)i; + } + i = 0; + if (parsedtag_get_value(tag, ATTR_BOTTOM_MARGIN, &i)) { +- if (i > obuf->bottom_margin) +- obuf->bottom_margin = i; ++ if ((short)i > obuf->bottom_margin) ++ obuf->bottom_margin = (short)i; + } + #endif + return 0; +@@ -4929,13 +4929,13 @@ HTMLtagproc1(struct parsed_tag *tag, struct html_feed_environ *h_env) + case HTML_INPUT_ALT: + i = 0; + if (parsedtag_get_value(tag, ATTR_TOP_MARGIN, &i)) { +- if (i > obuf->top_margin) +- obuf->top_margin = i; ++ if ((short)i > obuf->top_margin) ++ obuf->top_margin = (short)i; + } + i = 0; + if (parsedtag_get_value(tag, ATTR_BOTTOM_MARGIN, &i)) { +- if (i > obuf->bottom_margin) +- obuf->bottom_margin = i; ++ if ((short)i > obuf->bottom_margin) ++ obuf->bottom_margin = (short)i; + } + if (parsedtag_get_value(tag, ATTR_HSEQ, &hseq)) { + obuf->input_alt.hseq = hseq; diff --git a/debian/patches/series b/debian/patches/series index b122606..9919121 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -60,3 +60,4 @@ 922_lineproc.patch 923_tagproc.patch 924_curline.patch +925_lineproc.patch |