dnsmasq: fix heap overflow

Backport CVE-2017-14491.
(http://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commit;h=0549c73b7ea6b22a3c49beb4d432f185a81efcbc)

Bug: 158221622
Test: 1. Manual testing - build dnsmasq with asan enabled and test the
         corresponding functionalities.
      2. Test tethering still worked fine
Change-Id: I90390535198fe0a7b8084879d39f813d8de51ab3
4 files changed