mirror of https://github.com/aria2/aria2
Fix issues reported by coverity
parent
59c625b1fd
commit
ce868d75bd
|
@ -46,6 +46,7 @@ DownloadResult::DownloadResult()
|
||||||
totalLength(0),
|
totalLength(0),
|
||||||
completedLength(0),
|
completedLength(0),
|
||||||
uploadLength(0),
|
uploadLength(0),
|
||||||
|
following(0),
|
||||||
numPieces(0),
|
numPieces(0),
|
||||||
pieceLength(0),
|
pieceLength(0),
|
||||||
result(error_code::UNDEFINED),
|
result(error_code::UNDEFINED),
|
||||||
|
|
|
@ -586,10 +586,8 @@ bool parseUIntNoThrow(uint32_t& res, const std::string& s, int base)
|
||||||
|
|
||||||
bool parseLLIntNoThrow(int64_t& res, const std::string& s, int base)
|
bool parseLLIntNoThrow(int64_t& res, const std::string& s, int base)
|
||||||
{
|
{
|
||||||
long long int t;
|
int64_t t;
|
||||||
if (parseLong(t, strtoll, s, base) &&
|
if (parseLong(t, strtoll, s, base)) {
|
||||||
t >= std::numeric_limits<int64_t>::min() &&
|
|
||||||
t <= std::numeric_limits<int64_t>::max()) {
|
|
||||||
res = t;
|
res = t;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue