OSDN Git Service

Check for bad packets in getaddrinfo.c's getanswer.
authorElliott Hughes <enh@google.com>
Mon, 14 Nov 2016 21:56:32 +0000 (13:56 -0800)
committerElliott Hughes <enh@google.com>
Tue, 15 Nov 2016 20:25:08 +0000 (12:25 -0800)
commit9ea3f1c8a5280c99b5a315a06175dbce9d9296b7
treee76b504544c00ff618f21eb8724d62484552523e
parent099331965176b368af627858f087dc0eccd0fc18
Check for bad packets in getaddrinfo.c's getanswer.

The near duplicate in gethnamaddr.c was already doing so (this fix
is basically copy and pasted from there, but with both copies modified
to avoid skirting undefined behavior).

(cherrypick of 27a4459d945e34fabd7166791a5b862ccea83f23 from master.)

Bug: http://b/32322088
Test: browser still works
Change-Id: I16950bb0ff9dc806cc5405b913ca4ef96e43c19f
libc/dns/gethnamaddr.c
libc/dns/net/getaddrinfo.c