Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix s3 flex checksums for bad memory access #2916

Merged
merged 1 commit into from
Apr 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/aws-cpp-sdk-core/source/utils/crypto/PrecalculatedHash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,17 @@


#include <aws/core/utils/crypto/PrecalculatedHash.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/crt/Types.h>

using namespace Aws::Utils::Crypto;
using namespace Aws::Crt;

PrecalculatedHash::PrecalculatedHash(const Aws::String &hash) : m_hashString(hash), m_decodedHashString(HashingUtils::Base64Decode(hash)) {}
PrecalculatedHash::PrecalculatedHash(const Aws::String &hash) : m_hashString(hash)
{
const auto decoded = Base64Decode(hash.c_str());
ByteBuffer buf{decoded.data(), decoded.size()};
m_decodedHashString = std::move(buf);
}

PrecalculatedHash::~PrecalculatedHash() = default;

Expand Down
Loading