1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

gensec: recv_handler can't be NULL at that point.

We probably want to segfault here if it is NULL.

Reviewed-by: David Disseldorp <ddiss@samba.org>
This commit is contained in:
Andreas Schneider 2013-02-25 15:41:23 +01:00 committed by David Disseldorp
parent cab969d5ec
commit ceb1d8b84a

View File

@ -111,7 +111,7 @@ static void gensec_socket_trigger_read(struct tevent_context *ev,
/* It may well be that, having run the recv handler, we still
* have even more data waiting for us!
*/
if (gensec_socket->read_buffer.length && gensec_socket->recv_handler) {
if (gensec_socket->read_buffer.length > 0) {
/* Schedule this funcion to run again */
tevent_add_timer(gensec_socket->ev, gensec_socket, timeval_zero(),
gensec_socket_trigger_read, gensec_socket);