avoid read-heap-buffer-overflow (#332)

Fix invalid read in ares_parse_soa_reply.c found during fuzzing

Fixes Bug: #333 
Fix By: lutianxiong (@ltx2018)
pull/336/head
lutianxiong 5 years ago committed by GitHub
parent 4c02944ef1
commit 1b98172b14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      ares_parse_soa_reply.c

@ -69,6 +69,9 @@ ares_parse_soa_reply(const unsigned char *abuf, int alen,
status = ares__expand_name_for_response(aptr, abuf, alen, &qname, &len);
if (status != ARES_SUCCESS)
goto failed_stat;
if (alen <= len + HFIXEDSZ + 1)
goto failed;
aptr += len;
qclass = DNS_QUESTION_TYPE(aptr);

Loading…
Cancel
Save