diff options
author | Tatsuya Kinoshita <tats@debian.org> | 2021-04-24 14:39:34 +0000 |
---|---|---|
committer | Tatsuya Kinoshita <tats@debian.org> | 2021-04-24 14:39:34 +0000 |
commit | 38c043f50f80982b56e18e4422c6aa298202114d (patch) | |
tree | 52f3368feb5b34bb3c53d6c8131df0a5d318ccaf /main.c | |
parent | Update ChangeLog (diff) | |
download | w3m-38c043f50f80982b56e18e4422c6aa298202114d.tar.gz w3m-38c043f50f80982b56e18e4422c6aa298202114d.zip |
Check length of hostname with STR_SIZE_MAX
Diffstat (limited to '')
-rw-r--r-- | main.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); } } |