Fix style of array index is used before limits check
Bug: https://sourceforge.net/p/w3m/feature-requests/25/
This commit is contained in:
2
url.c
2
url.c
@@ -2080,7 +2080,7 @@ filename_extension(char *path, int is_url)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (*last_dot == '.') {
|
if (*last_dot == '.') {
|
||||||
for (i = 1; last_dot[i] && i < 8; i++) {
|
for (i = 1; i < 8 && last_dot[i]; i++) {
|
||||||
if (is_url && !IS_ALNUM(last_dot[i]))
|
if (is_url && !IS_ALNUM(last_dot[i]))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user