diff --git a/openbr/plugins/gallery.cpp b/openbr/plugins/gallery.cpp index c4b40da..b51f73d 100644 --- a/openbr/plugins/gallery.cpp +++ b/openbr/plugins/gallery.cpp @@ -207,6 +207,9 @@ class utGallery : public BinaryGallery dst += bytesRead; } + if (QCryptographicHash::hash(data, QCryptographicHash::Md5) != QByteArray((const char*)ut->templateID, 16)) + qFatal("MD5 hash check failure!"); + if (ut->algorithmID == 5) { QDataStream stream(&data, QIODevice::ReadOnly); stream >> t;