git: 31d385e78eba - stable/13 - ping: use the in6_addr buffer when parsing src address as AF_INET6
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 16 Aug 2023 17:48:08 UTC
The branch stable/13 has been updated by kp:
URL: https://cgit.FreeBSD.org/src/commit/?id=31d385e78eba5d0fd8a3d13fde86e345917a2588
commit 31d385e78eba5d0fd8a3d13fde86e345917a2588
Author: R. Christian McDonald <rcm@rcm.sh>
AuthorDate: 2023-08-08 18:40:02 +0000
Commit: Kristof Provost <kp@FreeBSD.org>
CommitDate: 2023-08-16 15:04:04 +0000
ping: use the in6_addr buffer when parsing src address as AF_INET6
Reviewed by: kp
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
(cherry picked from commit 9f2cddd261d09b736893454cb8b7aa0651ac5211)
---
sbin/ping/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sbin/ping/main.c b/sbin/ping/main.c
index 2f94b5d3227d..bfe19e0ff442 100644
--- a/sbin/ping/main.c
+++ b/sbin/ping/main.c
@@ -102,7 +102,7 @@ main(int argc, char *argv[])
*/
if (inet_pton(AF_INET, optarg, &a) == 1)
ipv4 = true;
- else if (inet_pton(AF_INET6, optarg, &a) == 1)
+ else if (inet_pton(AF_INET6, optarg, &a6) == 1)
ipv6 = true;
break;
#endif