summaryrefslogtreecommitdiff
path: root/apt-private
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2017-10-28 11:45:28 +0200
committerJulian Andres Klode <jak@debian.org>2017-10-28 11:54:33 +0200
commit197a813cc87f50262c6faac68916c3e9a60e4d5c (patch)
tree1f9b651a31659142ff2ab7de1093885787917fff /apt-private
parenta6375472a41af7f1521369d0c22a858d7051ab18 (diff)
downloadapt-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.cc4
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");