summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2016-03-13 22:44:37 +0100
committerDavid Kalnischkies <david@kalnischkies.de>2016-03-14 11:54:08 +0100
commitd4c45145553781418c25343ac1478f62da645851 (patch)
treede57731f933c6fe05c4fbabf4147399984895a5d /apt-pkg
parentb7a1076f18022cbeb7baf4d82ab8bae0f725a573 (diff)
enforce verify of filesize in 'apt-get source'
The structure we parse the data into has a dedicated size field, but it tends to be easier to handle it as a (very weak) checksum.
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/deb/debsrcrecords.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/apt-pkg/deb/debsrcrecords.cc b/apt-pkg/deb/debsrcrecords.cc
index cefaf46ac..e8295debb 100644
--- a/apt-pkg/deb/debsrcrecords.cc
+++ b/apt-pkg/deb/debsrcrecords.cc
@@ -216,6 +216,7 @@ bool debSrcRecordParser::Files2(std::vector<pkgSrcRecords::File2> &List)
F.Path = path;
F.FileSize = strtoull(size.c_str(), NULL, 10);
F.Hashes.push_back(hashString);
+ F.Hashes.FileSize(F.FileSize);
APT_IGNORE_DEPRECATED_PUSH
F.Size = F.FileSize;