diff options
author | Jeremy Allison <jra@samba.org> | 2006-03-12 04:18:43 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:15:18 -0500 |
commit | ff122b308bf4ad9115ebfe1d292051c3c5ecbb78 (patch) | |
tree | 7a0876df6d48683abfee1fd2fa32df071f372239 /source3 | |
parent | 79af0b91e0851321c28878df92559e41f4cb3651 (diff) | |
download | samba-ff122b308bf4ad9115ebfe1d292051c3c5ecbb78.tar.gz |
r14229: 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.
(This used to be commit 04838078723613628b298b7a87622df30432cf64)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/smbd/process.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c index a50323887a..40d6818f3f 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -445,9 +445,11 @@ static BOOL receive_message_or_smb(char *buffer, int buffer_len, int timeout) 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; + } } } |