diff options
author | Tatsuya Kinoshita <tats@debian.org> | 2016-12-08 14:43:46 +0000 |
---|---|---|
committer | Tatsuya Kinoshita <tats@debian.org> | 2016-12-08 14:46:30 +0000 |
commit | a932f78a6d8c105036ffeedf01215c1f6a0e0b71 (patch) | |
tree | bb604788ad051b86794400b07074e088f55abd99 /table.c | |
parent | Prevent overflow beyond the end of string in wtf_strwidth() (diff) | |
download | w3m-a932f78a6d8c105036ffeedf01215c1f6a0e0b71.tar.gz w3m-a932f78a6d8c105036ffeedf01215c1f6a0e0b71.zip |
Prevent overflow beyond the end of string in visible_length()
Bug-Debian: https://github.com/tats/w3m/issues/73
Diffstat (limited to 'table.c')
-rw-r--r-- | table.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -428,8 +428,9 @@ visible_length(char *str) Str tagbuf = Strnew(); char *t, *r2; int amp_len = 0; + char *strz = str + strlen(str); - while (*str) { + while (str < strz) { prev_status = status; if (next_status(*str, &status)) { #ifdef USE_M17N |