Merge pull request #2099 from aria2/fix-overflow

Fix overflow
pull/2101/head
Tatsuhiro Tsujikawa 2023-09-16 20:00:42 +09:00 committed by GitHub
commit 80534d869f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -302,7 +302,7 @@ std::unique_ptr<Cookie> parse(const std::string& cookieStr,
int64_t n = creationTime;
if (n > std::numeric_limits<int64_t>::max() - delta) {
maxAge = std::numeric_limits<int64_t>::max();
maxAge = std::numeric_limits<time_t>::max();
} else {
n += delta;