[xiph-commits] r14307 - icecast/trunk/icecast/src

karl at svn.xiph.org karl at svn.xiph.org
Sat Dec 15 09:21:22 PST 2007


Author: karl
Date: 2007-12-15 09:21:22 -0800 (Sat, 15 Dec 2007)
New Revision: 14307

Modified:
   icecast/trunk/icecast/src/auth.c
Log:
prevent NULL dereference


Modified: icecast/trunk/icecast/src/auth.c
===================================================================
--- icecast/trunk/icecast/src/auth.c	2007-12-15 17:02:16 UTC (rev 14306)
+++ icecast/trunk/icecast/src/auth.c	2007-12-15 17:21:22 UTC (rev 14307)
@@ -418,13 +418,14 @@
 
     if (source)
     {
-        if (check_duplicate_logins (source, client, mountinfo->auth) == 0)
-        {
-            avl_tree_unlock (global.source_tree);
-            return -1;
-        }
         if (mountinfo)
         {
+            if (check_duplicate_logins (source, client, mountinfo->auth) == 0)
+            {
+                avl_tree_unlock (global.source_tree);
+                return -1;
+            }
+
             /* set a per-mount disconnect time if auth hasn't set one already */
             if (mountinfo->max_listener_duration && client->con->discon_time == 0)
                 client->con->discon_time = time(NULL) + mountinfo->max_listener_duration;



More information about the commits mailing list