From 8adfa144094aadfe02a8e3c82d375ba600c60012 Mon Sep 17 00:00:00 2001 From: Apple Date: Mon, 23 Sep 2019 17:46:08 +0000 Subject: [PATCH] libresolv-67.40.1.tar.gz --- ns_name.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ns_name.c b/ns_name.c index 07b0739..1c24833 100644 --- a/ns_name.c +++ b/ns_name.c @@ -638,7 +638,7 @@ ns_name_skip(const u_char **ptrptr, const u_char *eom) { const u_char *cp; u_int n; - int l; + int l = 0; cp = *ptrptr; while (cp < eom && (n = *cp++) != 0) { @@ -648,7 +648,7 @@ ns_name_skip(const u_char **ptrptr, const u_char *eom) cp += n; continue; case NS_TYPE_ELT: /* EDNS0 extended label */ - if ((l = labellen(cp - 1)) < 0) { + if (cp < eom && (l = labellen(cp - 1)) < 0) { errno = EMSGSIZE; /* XXX */ return(-1); } -- 2.45.2