X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/7be8c02360bdb9bd7f59b087da874f88af2a7206..baec76f5f0f9fcbd71f6e2afaa7fc85543bd624c:/apt-pkg/contrib/sha1.cc?ds=sidebyside diff --git a/apt-pkg/contrib/sha1.cc b/apt-pkg/contrib/sha1.cc index b5a6a2440..298a7799b 100644 --- a/apt-pkg/contrib/sha1.cc +++ b/apt-pkg/contrib/sha1.cc @@ -32,12 +32,9 @@ #include #include -#include -#include +#include #include -#include -#include /*}}}*/ // SHA1Transform - Alters an existing SHA-1 hash /*{{{*/ @@ -246,6 +243,8 @@ bool SHA1Summation::Add(const unsigned char *data,unsigned long long len) { if (Done) return false; + if (len == 0) + return true; uint32_t *state = (uint32_t *)State; uint32_t *count = (uint32_t *)Count;