diff options
author | Guy Harris <gharris@sonic.net> | 2022-03-08 15:18:24 -0800 |
---|---|---|
committer | Guy Harris <gharris@sonic.net> | 2022-03-08 15:18:24 -0800 |
commit | f6fb59b11d20222d4648cdceeaadf6ce971a7a9a (patch) | |
tree | 82d4be40231a93047587a9cd52777b77528e188d /nametoaddr.c | |
parent | cc9e70b80e0a33130fcb24fbab13a40666976d7f (diff) | |
parent | e75cc82c46e0f1208fbac03530da6a30976c7fd6 (diff) |
Merge branch 'master' into pcap-options
Diffstat (limited to 'nametoaddr.c')
-rw-r--r-- | nametoaddr.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/nametoaddr.c b/nametoaddr.c index c944ad36..55f93897 100644 --- a/nametoaddr.c +++ b/nametoaddr.c @@ -785,9 +785,14 @@ pcap_ether_hostton(const char *name) { register u_char *ap; u_char a[6]; + char namebuf[1024]; + /* + * In AIX 7.1 and 7.2: int ether_hostton(char *, struct ether_addr *); + */ + pcap_strlcpy(namebuf, name, sizeof(namebuf)); ap = NULL; - if (ether_hostton(name, (struct ether_addr *)a) == 0) { + if (ether_hostton(namebuf, (struct ether_addr *)a) == 0) { ap = (u_char *)malloc(6); if (ap != NULL) memcpy((char *)ap, (char *)a, 6); |