Fix heap overflow in ares_mkquery.

Thanks to the reporter for the patch.

BUG=chromium:649040
TEST=Trybots

Change-Id: Ic038b69c227d8637c213ec655ace6bd567040db2
Reviewed-on: https://chromium-review.googlesource.com/388126
Commit-Ready: Ricky Zhou <[email protected]>
Tested-by: Ricky Zhou <[email protected]>
Reviewed-by: Mattias Nissler <[email protected]>
Reviewed-by: Dylan Reid <[email protected]>
Reviewed-by: Mike Frysinger <[email protected]>
3 files changed