Skip to content
Snippets Groups Projects
Commit 155d8782 authored by Guillaume Roguez's avatar Guillaume Roguez
Browse files

manager: fix crash with invalid parameters

If Manager::outgoinCall() is called with an non-empty but invalid conf_id
the application will crash with the call is hangup.
Fix that by checking conference id validity and existance.

Change-Id: If53defb747eaa25d2f3fce773b159b13fe34ad52
parent 060f2bda
Branches
Tags
No related merge requests found
...@@ -839,6 +839,11 @@ Manager::outgoingCall(const std::string& preferred_account_id, ...@@ -839,6 +839,11 @@ Manager::outgoingCall(const std::string& preferred_account_id,
const std::string& to, const std::string& to,
const std::string& conf_id) const std::string& conf_id)
{ {
if (not conf_id.empty() and not isConference(conf_id)) {
RING_ERR("outgoingCall() failed, invalid conference id");
return {};
}
std::string current_call_id(getCurrentCallId()); std::string current_call_id(getCurrentCallId());
std::string to_cleaned = hookPreference.getNumberAddPrefix() + trim(to); std::string to_cleaned = hookPreference.getNumberAddPrefix() + trim(to);
std::shared_ptr<Call> call; std::shared_ptr<Call> call;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment