X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/a0e07f3ec885c12c733c12805391646c202f3f31..15e1ed52a741ff82deb0a4cd6150cf10e23b7368:/apt-pkg/contrib/md5.cc diff --git a/apt-pkg/contrib/md5.cc b/apt-pkg/contrib/md5.cc index 4351aeb22..ff7868fe2 100644 --- a/apt-pkg/contrib/md5.cc +++ b/apt-pkg/contrib/md5.cc @@ -38,13 +38,9 @@ #include #include -#include -#include +#include #include -#include -#include // For htonl -#include /*}}}*/ // byteSwap - Swap bytes in a buffer /*{{{*/ @@ -191,6 +187,8 @@ 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;