diff options
author | Jiung <jiung.yu@samsung.com> | 2017-08-07 13:56:32 +0900 |
---|---|---|
committer | Jiung <jiung.yu@samsung.com> | 2017-08-07 13:56:35 +0900 |
commit | edc447f2f3134d81575f16b1701fc802161f153f (patch) | |
tree | a5377c7630cabe27fee1e0c53e81175f8882c234 /include | |
parent | 45e88a8337839e5fd88519bc55467053d521c9f6 (diff) | |
download | c-ares-edc447f2f3134d81575f16b1701fc802161f153f.tar.gz c-ares-edc447f2f3134d81575f16b1701fc802161f153f.tar.bz2 c-ares-edc447f2f3134d81575f16b1701fc802161f153f.zip |
ares_parse_naptr_reply: check sufficient data
Description:
https://github.com/c-ares/c-ares/commit/9478908a490a6bf009ba58d81de8c1d06d50a117
ares_parse_naptr_reply: check sufficient data
Check that there is enough data for the required elements
of an NAPTR record (2 int16, 3 bytes for string lengths)
before processing a record.
https://github.com/c-ares/c-ares/commit/18ea99693d63f957ecb670045adbd2c1da8a4641
ares_parse_naptr_reply: make buffer length check more accurate
9478908 introduced a length check
for records parsed by `ares_parse_naptr_reply()`. However, that
function is designed to parse replies which also contain non-NAPTR
records; for A records, the `rr_len > 7` check will fail as there
are only 4 bytes of payload.
In particular, parsing ANY replies for NAPTR records was broken
by that patch.
Fix that by moving the check into the case in which it is already
known that the record is a NAPTR record.
Change-Id: I7ca730c0367ff1cc416e67a3a99021438d237666
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions