X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/0b7d641cf12761c3dcc5edb4031adfc9709963e4..644478e8db56f305601c3628a74e53de048b28c8:/apt-pkg/contrib/md5.cc diff --git a/apt-pkg/contrib/md5.cc b/apt-pkg/contrib/md5.cc index 65e20e9bb..ff7868fe2 100644 --- a/apt-pkg/contrib/md5.cc +++ b/apt-pkg/contrib/md5.cc @@ -35,15 +35,12 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include + #include -#include -#include +#include #include -#include -#include // For htonl -#include -#include /*}}}*/ // byteSwap - Swap bytes in a buffer /*{{{*/ @@ -186,10 +183,12 @@ MD5Summation::MD5Summation() // MD5Summation::Add - 'Add' a data set to the hash /*{{{*/ // --------------------------------------------------------------------- /* */ -bool MD5Summation::Add(const unsigned char *data,unsigned long len) +bool MD5Summation::Add(const unsigned char *data,unsigned long long len) { if (Done == true) return false; + if (len == 0) + return true; uint32_t *buf = (uint32_t *)Buf; uint32_t *bytes = (uint32_t *)Bytes;