c-ares/backport-002-CVE-2023-31130.patch
xinghe 5e7a75f74c fix CVE-2023-31130 CVE-2023-31124 CVE-2023-31147
(cherry picked from commit ee7b9f0233249789e5736ddeec69ed70cd6e5452)
2023-06-12 13:37:18 +08:00

28 lines
957 B
Diff

From 424012216c40c8498015b942353e9bb7267e929b Mon Sep 17 00:00:00 2001
From: bradh352 <brad@brad-house.com>
Date: Mon, 22 May 2023 06:57:23 -0400
Subject: [PATCH] windows build fix
Conflict: src/lib/inet_net_pton.c -> inet_net_pton.c
Reference:https://github.com/c-ares/c-ares/commit/424012216c40c8498015b942353e9bb7267e929b
---
inet_net_pton.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/inet_net_pton.c b/inet_net_pton.c
index fc50425b..d94a5f41 100644
--- a/inet_net_pton.c
+++ b/inet_net_pton.c
@@ -314,8 +314,8 @@ ares_inet_pton6(const char *src, unsigned char *dst)
continue;
}
if (ch == '.' && ((tp + NS_INADDRSZ) <= endp) &&
- ares_inet_net_pton_ipv4(curtok, tp, INADDRSZ) > 0) {
- tp += INADDRSZ;
+ ares_inet_net_pton_ipv4(curtok, tp, NS_INADDRSZ) > 0) {
+ tp += NS_INADDRSZ;
saw_xdigit = 0;
count_xdigit = 0;
break; /* '\0' was seen by inet_pton4(). */