Commit 59aa663f authored by Philip Withnall's avatar Philip Withnall Committed by Olivier Crête

agent: Avoid a potential NULL pointer dereference

password could be NULL (priv_get_password() can return NULL), but
g_base64_decode() aborts if it receives NULL for the encoded text.
parent 5df6a17c
...@@ -1660,8 +1660,9 @@ int conn_check_send (NiceAgent *agent, CandidateCheckPair *pair) ...@@ -1660,8 +1660,9 @@ int conn_check_send (NiceAgent *agent, CandidateCheckPair *pair)
size_t buffer_len; size_t buffer_len;
unsigned int timeout; unsigned int timeout;
if (agent->compatibility == NICE_COMPATIBILITY_MSN || if (password != NULL &&
agent->compatibility == NICE_COMPATIBILITY_OC2007) { (agent->compatibility == NICE_COMPATIBILITY_MSN ||
agent->compatibility == NICE_COMPATIBILITY_OC2007)) {
password = g_base64_decode ((gchar *) password, &password_len); password = g_base64_decode ((gchar *) password, &password_len);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment