From 38780d659be8f8bb061409dd7bee60628e0050de Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 12 Jun 2009 17:27:58 +0200 Subject: Fix wb_req_more(): Return 0 when done, read_pkt_send needs that --- nsswitch/libwbclient/wb_reqtrans.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'nsswitch/libwbclient/wb_reqtrans.c') diff --git a/nsswitch/libwbclient/wb_reqtrans.c b/nsswitch/libwbclient/wb_reqtrans.c index 5328423b15..6dc429bb7d 100644 --- a/nsswitch/libwbclient/wb_reqtrans.c +++ b/nsswitch/libwbclient/wb_reqtrans.c @@ -84,6 +84,11 @@ static ssize_t wb_req_more(uint8_t *buf, size_t buflen, void *private_data) return sizeof(struct winbindd_request) - 4; } + if (buflen > sizeof(struct winbindd_request)) { + /* We've been here, we're done */ + return 0; + } + if ((state->max_extra_data != 0) && (req->extra_len > state->max_extra_data)) { DEBUG(3, ("Got request with %d bytes extra data on " -- cgit