diff options
Diffstat (limited to 'debian/patches/939_textarea.patch')
-rw-r--r-- | debian/patches/939_textarea.patch | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/debian/patches/939_textarea.patch b/debian/patches/939_textarea.patch new file mode 100644 index 0000000..fc6a011 --- /dev/null +++ b/debian/patches/939_textarea.patch @@ -0,0 +1,25 @@ +Subject: Prevent negative array index in process_textarea() +From: Tatsuya Kinoshita <tats@debian.org> +Bug-Debian: https://github.com/tats/w3m/issues/58 +Origin: https://anonscm.debian.org/cgit/collab-maint/w3m.git/commit/?id=d7f55d5959c3e06e9f110f13def7ae9015882e1e + +--- + file.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/file.c b/file.c +index c5aeb88..330ae3a 100644 +--- a/file.c ++++ b/file.c +@@ -3995,7 +3995,7 @@ process_textarea(struct parsed_tag *tag, int width) + cur_textarea_size = 20; + if (parsedtag_get_value(tag, ATTR_COLS, &p)) { + cur_textarea_size = atoi(p); +- if (p[strlen(p) - 1] == '%') ++ if (strlen(p) > 0 && p[strlen(p) - 1] == '%') + cur_textarea_size = width * cur_textarea_size / 100 - 2; + if (cur_textarea_size <= 0) { + cur_textarea_size = 20; +-- +2.10.2 + |