commit 66d08bb0a5bc23d1d7a764018e16b9bde15eb776
parent ce3c69640106c6197f132dc27b8197c4560a6a66
Author: htrb <htrb>
Date: Fri, 30 Jul 2010 08:50:39 +0000
* [w3m-dev 04345] Re: "important" bugs from bugs.debian.org
* file.c (HR_ATTR_WIDTH_MAX): added.
* file.c (process_hr): check w > HR_ATTR_WIDTH_MAX
Diffstat:
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,9 @@
+2010-07-30 Ito Hiroyuki <ZXB01226@nifty.com>
+
+ * [w3m-dev 04345] Re: "important" bugs from bugs.debian.org
+ * file.c (HR_ATTR_WIDTH_MAX): added.
+ * file.c (process_hr): check w > HR_ATTR_WIDTH_MAX
+
2010-07-26 d+w3m@vdr.jp
* [w3m-dev 04237] [patch] cookie avoid [wrong number of dots]
diff --git a/file.c b/file.c
@@ -4008,13 +4008,18 @@ process_hr(struct parsed_tag *tag, int width, int indent_width)
Str tmp = Strnew_charp("<nobr>");
int w = 0;
int x = ALIGN_CENTER;
+#define HR_ATTR_WIDTH_MAX 65535
if (width > indent_width)
width -= indent_width;
- if (parsedtag_get_value(tag, ATTR_WIDTH, &w))
+ if (parsedtag_get_value(tag, ATTR_WIDTH, &w)) {
+ if (w > HR_ATTR_WIDTH_MAX) {
+ w = HR_ATTR_WIDTH_MAX;
+ }
w = REAL_WIDTH(w, width);
- else
+ } else {
w = width;
+ }
parsedtag_get_value(tag, ATTR_ALIGN, &x);
switch (x) {