newer gcc versions seems to have no problem with that, but while working
[ntk/apt.git] / methods / http.cc
index c62ca71..b450b6f 100644 (file)
@@ -602,7 +602,7 @@ bool ServerState::HeaderLine(string Line)
         return true;
 
       Size = strtoull(Val.c_str(), NULL, 10);
-      if (Size == ULLONG_MAX)
+      if (Size >= std::numeric_limits<unsigned long long>::max())
         return _error->Errno("HeaderLine", _("The HTTP server sent an invalid Content-Length header"));
       return true;
    }