X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/6a4958d3134a3a61c036bc9ccaccc393c2bb99f2..e07f3d5a9ed2870a0e2909cc1e5e55e826086c53:/apt-pkg/contrib/hashes.cc?ds=sidebyside diff --git a/apt-pkg/contrib/hashes.cc b/apt-pkg/contrib/hashes.cc index 755ad2035..662c2bf8b 100644 --- a/apt-pkg/contrib/hashes.cc +++ b/apt-pkg/contrib/hashes.cc @@ -312,6 +312,8 @@ public: // Hashes::Add* - Add the contents of data or FD /*{{{*/ bool Hashes::Add(const unsigned char * const Data, unsigned long long const Size) { + if (Size == 0) + return true; bool Res = true; APT_IGNORE_DEPRECATED_PUSH if ((d->CalcHashes & MD5SUM) == MD5SUM)