summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-08-18 20:07:44 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:58:09 -0500
commit5f1f1e5e5c52ec8c453b5ea688f87004541cc5bd (patch)
tree9f8954da9b589dcd5977df0485b9aae8bb825d8e /source4
parent70f630d375de3f310ede4f78f6b4d3515139c5e9 (diff)
downloadsamba-5f1f1e5e5c52ec8c453b5ea688f87004541cc5bd.tar.gz
samba-5f1f1e5e5c52ec8c453b5ea688f87004541cc5bd.tar.bz2
samba-5f1f1e5e5c52ec8c453b5ea688f87004541cc5bd.zip
r1896: stricter check on packet parsing for NBT session replies
(This used to be commit 30ab38559e8c52ecdaf7ca9b124875ade82c5c66)
Diffstat (limited to 'source4')
-rw-r--r--source4/libcli/raw/clitransport.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/libcli/raw/clitransport.c b/source4/libcli/raw/clitransport.c
index 03a0540be0..91f0f0f8f5 100644
--- a/source4/libcli/raw/clitransport.c
+++ b/source4/libcli/raw/clitransport.c
@@ -354,7 +354,7 @@ static void smbcli_transport_finish_recv(struct smbcli_transport *transport)
req->in.allocated = req->in.size;
/* handle NBT session replies */
- if (req->in.buffer[0] != 0) {
+ if (req->in.size >= 4 && req->in.buffer[0] != 0) {
req->status = NT_STATUS_OK;
goto async;
}