Skip to content

Commit

Permalink
Prevent crash when failing to authenticate with remote
Browse files Browse the repository at this point in the history
  • Loading branch information
negasora committed Jun 12, 2024
1 parent 7c0514b commit 1415c07
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions collaboration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -700,6 +700,8 @@ bool Remote::LoadMetadata()
std::string Remote::RequestAuthenticationToken(const std::string& username, const std::string& password)
{
char* token = BNRemoteRequestAuthenticationToken(m_object, username.c_str(), password.c_str());
if (token == nullptr)
throw RemoteException("Failed to authenticate");
std::string result = token;
BNFreeString(token);
return result;
Expand Down

0 comments on commit 1415c07

Please sign in to comment.