diff options
author | Kristian Monsen <kristianm@google.com> | 2011-11-22 13:35:45 +0000 |
---|---|---|
committer | Kristian Monsen <kristianm@google.com> | 2011-11-22 13:35:45 +0000 |
commit | 940e47a8a93a8720ca55c0966689f4cdd4bf5b4e (patch) | |
tree | b40b20185de12cf0f660cd8b37be209e5112f39c /net | |
parent | 754777ec24185272ad267a324907d384e274b648 (diff) | |
download | external_chromium-940e47a8a93a8720ca55c0966689f4cdd4bf5b4e.zip external_chromium-940e47a8a93a8720ca55c0966689f4cdd4bf5b4e.tar.gz external_chromium-940e47a8a93a8720ca55c0966689f4cdd4bf5b4e.tar.bz2 |
Fix for bug 5152544, remove warning from chromium port
This is a cherry-pick of http://codereview.chromium.org/8354008/
No more warnings after this is merged.
Change-Id: I788d28545e7961d0145a3f1273ce4302f8c432ad
Diffstat (limited to 'net')
-rw-r--r-- | net/base/dns_util.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/net/base/dns_util.cc b/net/base/dns_util.cc index d97d3d2..ea58e5d 100644 --- a/net/base/dns_util.cc +++ b/net/base/dns_util.cc @@ -60,7 +60,11 @@ std::string DNSDomainToString(const std::string& domain) { std::string ret; for (unsigned i = 0; i < domain.size() && domain[i]; i += domain[i] + 1) { - if (domain[i] < 0 || domain[i] > 63) +#if CHAR_MIN < 0 + if (domain[i] < 0) + return ""; +#endif + if (domain[i] > 63) return ""; if (i) |