From 940e47a8a93a8720ca55c0966689f4cdd4bf5b4e Mon Sep 17 00:00:00 2001 From: Kristian Monsen Date: Tue, 22 Nov 2011 13:35:45 +0000 Subject: 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 --- net/base/dns_util.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'net') 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) -- cgit v1.1