Author: jra
Date: 2006-03-12 04:18:43 +0000 (Sun, 12 Mar 2006)
New Revision: 14229

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14229

Log:
Something Coverity hasn't caught (yet) but I've gotten
sensitive to null derefs. get_timed_events_timeout()
can potentially return NULL. Cope with this.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/smbd/process.c


Changeset:
Modified: branches/SAMBA_3_0/source/smbd/process.c
===================================================================
--- branches/SAMBA_3_0/source/smbd/process.c    2006-03-12 00:08:12 UTC (rev 
14228)
+++ branches/SAMBA_3_0/source/smbd/process.c    2006-03-12 04:18:43 UTC (rev 
14229)
@@ -445,9 +445,11 @@
                struct timeval tmp;
                struct timeval *tp = 
get_timed_events_timeout(&tmp,SMBD_SELECT_TIMEOUT);
 
-               to = timeval_min(&to, tp);
-               if (timeval_is_zero(&to)) {
-                       return True;
+               if (tp) {
+                       to = timeval_min(&to, tp);
+                       if (timeval_is_zero(&to)) {
+                               return True;
+                       }
                }
        }
        

Reply via email to