diff options
author | Julian Andres Klode <jak@debian.org> | 2017-10-28 11:45:28 +0200 |
---|---|---|
committer | Julian Andres Klode <jak@debian.org> | 2017-10-28 11:54:33 +0200 |
commit | 197a813cc87f50262c6faac68916c3e9a60e4d5c (patch) | |
tree | 1f9b651a31659142ff2ab7de1093885787917fff /apt-private | |
parent | a6375472a41af7f1521369d0c22a858d7051ab18 (diff) | |
download | apt-197a813cc87f50262c6faac68916c3e9a60e4d5c.tar.gz |
Also use FindULL for checking if the size tags is valid
It used FindI() > 0, but if it is too big, FindI() would
cause an error "Cannot convert %s to integer: out of range",
so let's also use FindULL() here.
Gbp-Dch: ignore
Diffstat (limited to 'apt-private')
-rw-r--r-- | apt-private/private-show.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apt-private/private-show.cc b/apt-private/private-show.cc index 1baf7990a..afe448a33 100644 --- a/apt-private/private-show.cc +++ b/apt-private/private-show.cc @@ -184,12 +184,12 @@ static bool DisplayRecordV2(pkgCacheFile &CacheFile, pkgCache::VerIterator const // make size nice std::string installed_size; - if (Tags.FindI("Installed-Size") > 0) + if (Tags.FindULL("Installed-Size") > 0) strprintf(installed_size, "%sB", SizeToStr(Tags.FindULL("Installed-Size") * 1024).c_str()); else installed_size = _("unknown"); std::string package_size; - if (Tags.FindI("Size") > 0) + if (Tags.FindULL("Size") > 0) strprintf(package_size, "%sB", SizeToStr(Tags.FindULL("Size")).c_str()); else package_size = _("unknown"); |