git.samba.org
/
jelmer
/
samba4-debian.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cbe06ad
)
r12370: - if we got a reply without a pending request, mark the socket as dead
author
Stefan Metzmacher
<metze@samba.org>
Mon, 19 Dec 2005 21:19:14 +0000
(21:19 +0000)
committer
Gerald (Jerry) Carter
<jerry@samba.org>
Wed, 10 Oct 2007 18:47:31 +0000
(13:47 -0500)
instead of segfaulting
metze
source/libcli/wrepl/winsrepl.c
patch
|
blob
|
history
diff --git
a/source/libcli/wrepl/winsrepl.c
b/source/libcli/wrepl/winsrepl.c
index ead83768344c9b2525cbabcd1abd806b6940ec04..b67138f1dd24bd50bb234f8055f353bb5fde4e47 100644
(file)
--- a/
source/libcli/wrepl/winsrepl.c
+++ b/
source/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);