diff options
author | Jiung <jiung.yu@samsung.com> | 2017-08-07 13:59:41 +0900 |
---|---|---|
committer | Jiung Yu <jiung.yu@samsung.com> | 2017-11-06 04:47:59 +0000 |
commit | 99c49e08750dc756c0c9634a6d12e0af81b9881c (patch) | |
tree | 7a9ce601bf43420fdcfde2977c70c3650b8af332 | |
parent | 8166b0204b6945a4fdb89bbae0b0b7168a7cf6e8 (diff) | |
download | c-ares-accepted/tizen_4.0_base.tar.gz c-ares-accepted/tizen_4.0_base.tar.bz2 c-ares-accepted/tizen_4.0_base.zip |
Merge branch 'tizen' into tizen_basetizen_4.0.IoT.p2_releasesubmit/tizen_4.0_base/20171106.054347accepted/tizen/4.0/base/20171110.190343accepted/tizen_4.0_base
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) |