diff options
author | Jiung <jiung.yu@samsung.com> | 2017-08-07 13:59:41 +0900 |
---|---|---|
committer | Jiung Yu <jiung.yu@samsung.com> | 2017-08-07 05:02:05 +0000 |
commit | 5bcd3658f45d71808854d4425a1f466780d70bf9 (patch) | |
tree | 7a9ce601bf43420fdcfde2977c70c3650b8af332 | |
parent | 8166b0204b6945a4fdb89bbae0b0b7168a7cf6e8 (diff) | |
parent | edc447f2f3134d81575f16b1701fc802161f153f (diff) | |
download | c-ares-5bcd3658f45d71808854d4425a1f466780d70bf9.tar.gz c-ares-5bcd3658f45d71808854d4425a1f466780d70bf9.tar.bz2 c-ares-5bcd3658f45d71808854d4425a1f466780d70bf9.zip |
Merge branch 'tizen' into tizen_basesubmit/tizen_base/20171106.054136submit/tizen_5.0_base/20181101.000001accepted/tizen/base/20171110.163200accepted/tizen/5.0/base/20181101.091108
Change-Id: I57bed66206d1aab30e02ded357d1ff4f2d444ed6
-rw-r--r-- | ares_parse_naptr_reply.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ares_parse_naptr_reply.c b/ares_parse_naptr_reply.c index 11634df..0e37b02 100644 --- a/ares_parse_naptr_reply.c +++ b/ares_parse_naptr_reply.c @@ -116,6 +116,13 @@ ares_parse_naptr_reply (const unsigned char *abuf, int alen, { /* parse the NAPTR record itself */ + /* RR must contain at least 7 bytes = 2 x int16 + 3 x name */ + if (rr_len < 7) + { + status = ARES_EBADRESP; + break; + } + /* Allocate storage for this NAPTR answer appending it to the list */ naptr_curr = ares_malloc_data(ARES_DATATYPE_NAPTR_REPLY); if (!naptr_curr) |