]> git.saurik.com Git - apt.git/blobdiff - methods/http.cc
make expected-size a maximum-size check as this is what we want at this point
[apt.git] / methods / http.cc
index b076e59ccc52f883fb96643acaef39f9d8550aa6..f8faa0cf8cbfff41be3a4867c3cc26936aa97a0b 100644 (file)
@@ -655,10 +655,10 @@ bool HttpServerState::Go(bool ToFile, FileFd * const File)
         return _error->Errno("write",_("Error writing to output file"));
    }
 
-   if (ExpectedSize > 0 && File && File->Tell() > ExpectedSize)
+   if (MaximumSize > 0 && File && File->Tell() > MaximumSize)
    {
       return _error->Error("Writing more data than expected (%llu > %llu)",
-                           File->Tell(), ExpectedSize);
+                           File->Tell(), MaximumSize);
    }
 
    // Handle commands from APT