aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTatsuya Kinoshita <tats@debian.org>2016-11-07 12:14:50 +0000
committerTatsuya Kinoshita <tats@debian.org>2016-11-07 12:14:50 +0000
commitff8510ab954ac5db478964351f6a78891c34f1d8 (patch)
tree308bd72a3f17643a9a5710c0292b086e8d61a497
parentUpdate ChangeLog (diff)
downloadw3m-ff8510ab954ac5db478964351f6a78891c34f1d8.tar.gz
w3m-ff8510ab954ac5db478964351f6a78891c34f1d8.zip
Prevent infinite recursion in HTMLlineproc0
Bug-Debian: https://github.com/tats/w3m/issues/36
-rw-r--r--file.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/file.c b/file.c
index 29ad96b..f5b160f 100644
--- a/file.c
+++ b/file.c
@@ -4926,13 +4926,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;
@@ -4946,13 +4946,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;