summaryrefslogtreecommitdiff
path: root/source4/libcli
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2005-12-19 21:19:14 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:47:31 -0500
commit8cf545b0ae171da891266baba93a7d016890ea93 (patch)
tree4837b4dcfbe8ca1d6a8f7d3603d85873d2f5272f /source4/libcli
parent64b611a18e2425994e611b0af21e9c4362f9f207 (diff)
downloadsamba-8cf545b0ae171da891266baba93a7d016890ea93.tar.gz
samba-8cf545b0ae171da891266baba93a7d016890ea93.tar.bz2
samba-8cf545b0ae171da891266baba93a7d016890ea93.zip
r12370: - if we got a reply without a pending request, mark the socket as dead
instead of segfaulting metze (This used to be commit 043f5c1054cd2dc95571d601b0872c4cb0d99588)
Diffstat (limited to 'source4/libcli')
-rw-r--r--source4/libcli/wrepl/winsrepl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source4/libcli/wrepl/winsrepl.c b/source4/libcli/wrepl/winsrepl.c
index ead8376834..b67138f1dd 100644
--- a/source4/libcli/wrepl/winsrepl.c
+++ b/source4/libcli/wrepl/winsrepl.c
@@ -84,6 +84,11 @@ static NTSTATUS wrepl_finish_recv(void *private, DATA_BLOB packet_blob_in)
struct wrepl_request *req = wrepl_socket->recv_queue;
DATA_BLOB blob;
+ if (!req) {
+ DEBUG(1,("Received unexpected WINS packet of length %u!\n", packet_blob_in.length));
+ return NT_STATUS_INVALID_NETWORK_RESPONSE;
+ }
+
req->packet = talloc(req, struct wrepl_packet);
NT_STATUS_HAVE_NO_MEMORY(req->packet);