Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(77)

Unified Diff: net/base/ip_endpoint.h

Issue 976903002: IPEndPoint::ToString should not crash when the IP address is empty. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/base/ip_endpoint.h
diff --git a/net/base/ip_endpoint.h b/net/base/ip_endpoint.h
index c2639b161d6f41dac152be0e7007afb484c5d4c9..0fb91ee212bcf85440a2049823a09b560c8041d5 100644
--- a/net/base/ip_endpoint.h
+++ b/net/base/ip_endpoint.h
@@ -53,9 +53,8 @@ class NET_EXPORT IPEndPoint {
bool FromSockAddr(const struct sockaddr* address, socklen_t address_length)
WARN_UNUSED_RESULT;
- // Returns value as a string (e.g. "127.0.0.1:80"). Returns empty
- // string if the address is invalid, and cannot not be converted to a
- // string.
+ // Returns value as a string (e.g. "127.0.0.1:80"). The IP address must be
+ // valid, or it will crash.
Ryan Sleevi 2015/03/06 21:23:41 remove "or it will crash."
std::string ToString() const;
// As above, but without port.
« jingle/glue/proxy_resolving_client_socket.cc ('K') | « jingle/glue/proxy_resolving_client_socket.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698