summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/base/dns_util.cc6
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)