Fix boundary check problems in socket_host.cc.
See the bug for the full list of security issues fixed.

BUG=416528

Review URL: https://codereview.chromium.org/589183002

Cr-Commit-Position: refs/heads/master@{#296287}
3 files changed