projects
/
platform
/
upstream
/
c-ares.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8166b02
)
Merge branch 'tizen' into tizen_base
34/158934/1
accepted/tizen_4.0_base
accepted/tizen/4.0/base/20171110.190343
submit/tizen_4.0_base/20171106.054347
tizen_4.0.IoT.p2_release
author
Jiung
<jiung.yu@samsung.com>
Mon, 7 Aug 2017 04:59:41 +0000
(13:59 +0900)
committer
Jiung Yu
<jiung.yu@samsung.com>
Mon, 6 Nov 2017 04:47:59 +0000
(
04:47
+0000)
Change-Id: I57bed66206d1aab30e02ded357d1ff4f2d444ed6
ares_parse_naptr_reply.c
patch
|
blob
|
history
diff --git
a/ares_parse_naptr_reply.c
b/ares_parse_naptr_reply.c
index
11634df
..
0e37b02
100644
(file)
--- 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)