mirror of
https://frontier.innolan.net/rainlance/c-ares.git
synced 2026-10-12 16:52:55 +00:00
Fix compiler warning: addition result could be truncated before cast to bigger sized type
This commit is contained in:
+1
-1
@@ -194,7 +194,7 @@ int ares__get_hostent(FILE *fp, int family, struct hostent **host)
|
||||
memcpy(hostent->h_addr_list[0], &addr6, addrlen);
|
||||
|
||||
/* Copy aliases. */
|
||||
hostent->h_aliases = malloc((naliases + 1) * sizeof(char *));
|
||||
hostent->h_aliases = malloc((((size_t)naliases) + 1) * sizeof(char *));
|
||||
if (!hostent->h_aliases)
|
||||
break;
|
||||
alias = hostent->h_aliases;
|
||||
|
||||
Reference in New Issue
Block a user