Skip to content

Commit 082415a

Browse files
Security fix in AuthenticationClient (#729)
Fixed possible stack overflow while copying data from string in AuthenticationClient::Impl::SignInFederated Resolves: OLPEDGE-1716 Signed-off-by: Serhii Lozynskyi <[email protected]>
1 parent d77d875 commit 082415a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

olp-cpp-sdk-authentication/src/AuthenticationClient.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ client::CancellationToken AuthenticationClient::Impl::SignInFederated(
615615
AuthenticationClient::SignInUserCallback callback) {
616616
auto payload =
617617
std::make_shared<std::vector<unsigned char>>(request_body.size());
618-
std::memcpy(payload->data(), request_body.data(), request_body.size());
618+
std::memcpy(payload->data(), request_body.data(), payload->size());
619619
return HandleUserRequest(credentials, kOauthEndpoint, payload, callback);
620620
}
621621

0 commit comments

Comments
 (0)