diff options
author | Ito Hiroyuki <ZXB01226@nifty.com> | 2010-07-30 08:50:39 +0000 |
---|---|---|
committer | Ito Hiroyuki <ZXB01226@nifty.com> | 2010-07-30 08:50:39 +0000 |
commit | ee6f535379b157dd33211f7b3fe0527dccfdd99c (patch) | |
tree | dc4096ce08f7633f54f4fc04669d13cecd3779a9 | |
parent | * [w3m-dev 04237] [patch] cookie avoid [wrong number of dots] (diff) | |
download | w3m-ee6f535379b157dd33211f7b3fe0527dccfdd99c.tar.gz w3m-ee6f535379b157dd33211f7b3fe0527dccfdd99c.zip |
* [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 (limited to '')
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | file.c | 11 |
2 files changed, 15 insertions, 4 deletions
@@ -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] @@ -9061,4 +9067,4 @@ a * [w3m-dev 03276] compile error on EWS4800 * release-0-2-1 * import w3m-0.2.1 -$Id: ChangeLog,v 1.1021 2010/07/26 11:38:53 htrb Exp $ +$Id: ChangeLog,v 1.1022 2010/07/30 08:50:39 htrb Exp $ @@ -1,4 +1,4 @@ -/* $Id: file.c,v 1.260 2010/07/24 04:30:40 htrb Exp $ */ +/* $Id: file.c,v 1.261 2010/07/30 08:50:39 htrb Exp $ */ #include "fm.h" #include <sys/types.h> #include "myctype.h" @@ -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) { |