]> git.saurik.com Git - apple/mdnsresponder.git/commitdiff
mDNSResponder-878.70.2.tar.gz macos-10136 v878.70.2
authorApple <opensource@apple.com>
Thu, 30 Aug 2018 17:36:01 +0000 (17:36 +0000)
committerApple <opensource@apple.com>
Thu, 30 Aug 2018 17:36:01 +0000 (17:36 +0000)
Makefile
mDNSCore/DNSCommon.c
mDNSShared/dns_sd.h

index fa0a4e49cb5c6df6e69c9e13210f1766184e0a52..978c8953fd1b18661b7ea8f8cdafbf3f138aa3ae 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -16,7 +16,7 @@
 
 include $(MAKEFILEPATH)/pb_makefiles/platform.make
 
-MVERS = "mDNSResponder-878.50.17"
+MVERS = "mDNSResponder-878.70.2"
 
 VER =
 ifneq ($(strip $(GCC_VERSION)),)
index 750c10e65e3619446b7e17906a5c21bfd90bbc45..597c4cc0d2bbec34130ebf780197d666a777a4a1 100644 (file)
@@ -2770,7 +2770,9 @@ mDNSexport const mDNSu8 *getDomainName(const DNSMessage *const msg, const mDNSu8
 
         case 0x80:  debugf("getDomainName: Illegal label length 0x%X in domain name %##s", len, name->c); return(mDNSNULL);
 
-        case 0xC0:  offset = (mDNSu16)((((mDNSu16)(len & 0x3F)) << 8) | *ptr++);
+        case 0xC0:  if (ptr >= end)
+            { debugf("getDomainName: Malformed compression label (overruns packet end)"); return(mDNSNULL); }
+            offset = (mDNSu16)((((mDNSu16)(len & 0x3F)) << 8) | *ptr++);
             if (!nextbyte) nextbyte = ptr;              // Record where we got to before we started following pointers
             ptr = (mDNSu8 *)msg + offset;
             if (ptr < (mDNSu8*)msg || ptr >= end)
@@ -3335,7 +3337,7 @@ mDNSexport mDNSBool SetRData(const DNSMessage *const msg, const mDNSu8 *ptr, con
             AssignDomainName(&name, (domainname *)ptr);
             ptr += DomainNameLength(&name);
         }
-        if (!ptr)
+        if (!ptr || ptr >= end)
         {
             LogInfo("SetRData: Malformed name for TSIG/TKEY type %d", rr->resrec.rrtype);
             goto fail;
index 94237fb31293b11cc4c03b46635a1824b7eb5c9e..0e5c35eee24d7c57d9641b15be1851f57a1565a9 100644 (file)
@@ -66,7 +66,7 @@
  */
 
 #ifndef _DNS_SD_H
-#define _DNS_SD_H 8785017
+#define _DNS_SD_H 8787002
 
 #ifdef  __cplusplus
 extern "C" {