summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-06-12 17:27:58 +0200
committerVolker Lendecke <vl@samba.org>2009-06-12 17:30:12 +0200
commit38780d659be8f8bb061409dd7bee60628e0050de (patch)
treef0b1aa3e15b579ccf8dd38bbaf4cc7ac8a28a963
parent7c3f31a26213035aa57a4a615c7760bc109edebc (diff)
downloadsamba-38780d659be8f8bb061409dd7bee60628e0050de.tar.gz
samba-38780d659be8f8bb061409dd7bee60628e0050de.tar.bz2
samba-38780d659be8f8bb061409dd7bee60628e0050de.zip
Fix wb_req_more(): Return 0 when done, read_pkt_send needs that
-rw-r--r--nsswitch/libwbclient/wb_reqtrans.c5
1 files changed, 5 insertions, 0 deletions
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 "