From 7224be0fe2f4beb916b7b69141f478facd0f0634 Mon Sep 17 00:00:00 2001
From: Denis Ovsienko <denis@ovsienko.info>
Date: Sat, 27 Dec 2025 21:36:11 +0000
Subject: [PATCH] Rename one of the xdtoi() copies to simplify backporting.

CVE: CVE-2025-11961
Upstream-Status: Backport [https://github.com/the-tcpdump-group/libpcap/commit/7224be0fe2f4beb916b7b69141f478facd0f0634]
Signed-off-by: Peter Marko <peter.marko@siemens.com>
---
 nametoaddr.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/nametoaddr.c b/nametoaddr.c
index dc75495c..bdaacbf1 100644
--- a/nametoaddr.c
+++ b/nametoaddr.c
@@ -646,7 +646,7 @@ pcap_nametollc(const char *s)
 
 /* Hex digit to 8-bit unsigned integer. */
 static inline u_char
-xdtoi(u_char c)
+pcapint_xdtoi(u_char c)
 {
 	if (c >= '0' && c <= '9')
 		return (u_char)(c - '0');
@@ -728,10 +728,10 @@ pcap_ether_aton(const char *s)
 	while (*s) {
 		if (*s == ':' || *s == '.' || *s == '-')
 			s += 1;
-		d = xdtoi(*s++);
+		d = pcapint_xdtoi(*s++);
 		if (PCAP_ISXDIGIT(*s)) {
 			d <<= 4;
-			d |= xdtoi(*s++);
+			d |= pcapint_xdtoi(*s++);
 		}
 		*ep++ = d;
 	}
