[Pkg-telepathy-commits] [libnice] 27/265: agent: Avoid a potential NULL pointer dereference

Simon McVittie smcv at debian.org
Wed May 14 12:04:49 UTC 2014


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to branch debian
in repository libnice.

commit 59aa663fbb391a4dd8067a1ca4ed91be1ac6ba1c
Author: Philip Withnall <philip.withnall at collabora.co.uk>
Date:   Tue Dec 17 09:35:31 2013 +0000

    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.
---
 agent/conncheck.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/agent/conncheck.c b/agent/conncheck.c
index d12f603..20aac34 100644
--- 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);
   }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-telepathy/libnice.git



More information about the Pkg-telepathy-commits mailing list