From 197a813cc87f50262c6faac68916c3e9a60e4d5c Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Sat, 28 Oct 2017 11:45:28 +0200 Subject: 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 --- apt-private/private-show.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apt-private') 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"); -- cgit v1.2.3