X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/216d0bd8869c4f52ead5256064512ac97e9fc824..769e06cf07625f4a2f5c84340ef6af697d7b0894:/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;