diff options
Diffstat (limited to 'lib/pluginloader/pluginloader.cpp')
-rw-r--r-- | lib/pluginloader/pluginloader.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/pluginloader/pluginloader.cpp b/lib/pluginloader/pluginloader.cpp index 082a449..ce84c7a 100644 --- a/lib/pluginloader/pluginloader.cpp +++ b/lib/pluginloader/pluginloader.cpp @@ -65,7 +65,11 @@ bool PluginLoader::verify(const char *hashName) const std::size_t buffer_size = 1024; std::vector<char> buffer(buffer_size); - while(const auto sz = plugin.readsome(&buffer.front(), buffer_size)) { + std::size_t sz = 0; + while(true) { + sz = static_cast<std::size_t>(plugin.readsome(&buffer.front(), buffer_size)); + if(sz <= 0) + break; rc = EVP_DigestVerifyUpdate(ctx, reinterpret_cast<unsigned char *>(buffer.data()), sz); if(rc != 1) { m_sigError = tr("Failed to compute signature (stage=update)"); |