fix out-of-bounds reads in __dns_parse