From 8cf545b0ae171da891266baba93a7d016890ea93 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 19 Dec 2005 21:19:14 +0000 Subject: 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) --- source4/libcli/wrepl/winsrepl.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source4/libcli') 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); -- cgit