Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:DocB:Orthanc
orthanc
toolbox.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File toolbox.patch of Package orthanc
--- a/OrthancFramework/Sources/Toolbox.cpp Fri Sep 20 16:05:04 2024 +0200 +++ b/OrthancFramework/Sources/Toolbox.cpp Tue Sep 24 09:26:42 2024 +0200 @@ -801,7 +801,6 @@ return result; } - void Toolbox::ComputeSHA1(std::string& result, const void* data, size_t size) @@ -814,11 +813,13 @@ } unsigned int digest[5]; - // Sanity check for the memory layout: A SHA-1 digest is 160 bits wide - assert(sizeof(unsigned int) == 4 && sizeof(digest) == (160 / 8)); + assert(sizeof(unsigned int) == 4 && sizeof(digest) == (160 / 8)); + assert(sizeof(boost::uuids::detail::sha1::digest_type) == 20); - sha1.get_digest(digest); + // From Boost 1.86, digest_type is "unsigned char[20]" while it was "unsigned int[5]"" in previous versions. + // Always perform the cast even if it is useless for Boost < 1.86 + sha1.get_digest(*(reinterpret_cast<boost::uuids::detail::sha1::digest_type*>(digest))); result.resize(8 * 5 + 4); sprintf(&result[0], "%08x-%08x-%08x-%08x-%08x",
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor