projects
/
platform
/
upstream
/
libnice.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5df6a17
)
agent: Avoid a potential NULL pointer dereference
author
Philip Withnall
<philip.withnall@collabora.co.uk>
Tue, 17 Dec 2013 09:35:31 +0000
(09:35 +0000)
committer
Olivier CrĂȘte
<olivier.crete@collabora.com>
Wed, 18 Dec 2013 22:50:57 +0000
(17:50 -0500)
password could be NULL (priv_get_password() can return NULL), but
g_base64_decode() aborts if it receives NULL for the encoded text.
agent/conncheck.c
patch
|
blob
|
history
diff --git
a/agent/conncheck.c
b/agent/conncheck.c
index
d12f603
..
20aac34
100644
(file)
--- a/
agent/conncheck.c
+++ b/
agent/conncheck.c
@@
-1660,8
+1660,9
@@
int conn_check_send (NiceAgent *agent, CandidateCheckPair *pair)
size_t buffer_len;
unsigned int timeout;
- if (agent->compatibility == NICE_COMPATIBILITY_MSN ||
- agent->compatibility == NICE_COMPATIBILITY_OC2007) {
+ if (password != NULL &&
+ (agent->compatibility == NICE_COMPATIBILITY_MSN ||
+ agent->compatibility == NICE_COMPATIBILITY_OC2007)) {
password = g_base64_decode ((gchar *) password, &password_len);
}