aboutsummaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorTatsuya Kinoshita <tats@debian.org>2021-04-24 14:39:34 +0000
committerTatsuya Kinoshita <tats@debian.org>2021-04-24 14:39:34 +0000
commit38c043f50f80982b56e18e4422c6aa298202114d (patch)
tree52f3368feb5b34bb3c53d6c8131df0a5d318ccaf /main.c
parentUpdate ChangeLog (diff)
downloadw3m-38c043f50f80982b56e18e4422c6aa298202114d.tar.gz
w3m-38c043f50f80982b56e18e4422c6aa298202114d.zip
Check length of hostname with STR_SIZE_MAX
Diffstat (limited to 'main.c')
-rw-r--r--main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main.c b/main.c
index 6f15e36..ced6f40 100644
--- a/main.c
+++ b/main.c
@@ -462,7 +462,7 @@ main(int argc, char **argv, char **envp)
/* Don't use hostname if it is truncated. */
hostname[HOST_NAME_MAX + 1] = '\0';
hostname_len = strlen(hostname);
- if (hostname_len <= HOST_NAME_MAX && hostname_len <= INT_MAX)
+ if (hostname_len <= HOST_NAME_MAX && hostname_len < STR_SIZE_MAX)
HostName = allocStr(hostname, (int)hostname_len);
}
}