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 00:33:06 +0000 (16:33 -0800)
commit27a4459d945e34fabd7166791a5b862ccea83f23
treeaee418a81d67de2868ed10a023ebb50832c938f0
parent7608f81938e1ea2badfc9c1ddc96565f4192fb9c
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).

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