Commit 83fc639b authored by tsepez@chromium.org's avatar tsepez@chromium.org

Check IP address size when deserializing IPEndPoint.

Failure to do so leads to a CHECK() in the browser under the IPC fuzzing
tests, which generates a lot of false positives.  Instead, we can invert
the situation and blame the renderer.

BUG=349572

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255686 0039d316-1c4b-4281-b951-d872f2087c98
parent 14c28807
......@@ -120,6 +120,11 @@ bool ParamTraits<net::IPEndPoint>::Read(const Message* m, PickleIterator* iter,
int port;
if (!ReadParam(m, iter, &address) || !ReadParam(m, iter, &port))
return false;
if (address.size() &&
address.size() != net::kIPv4AddressSize &&
address.size() != net::kIPv6AddressSize) {
return false;
}
*p = net::IPEndPoint(address, port);
return true;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment