summaryrefslogtreecommitdiff
path: root/source3/smbd/process.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2010-09-26 02:59:32 -0700
committerJeremy Allison <jra@samba.org>2010-09-26 03:01:03 -0700
commit03841f9e44950811907ea83e8caedac2a80bce06 (patch)
tree39d6d5112f636b8640d5af3622fefdd376058e15 /source3/smbd/process.c
parent80f8419ef25baa7b2f6d78469084a2ee80296fa1 (diff)
downloadsamba-03841f9e44950811907ea83e8caedac2a80bce06.tar.gz
samba-03841f9e44950811907ea83e8caedac2a80bce06.tar.bz2
samba-03841f9e44950811907ea83e8caedac2a80bce06.zip
Fix bug #7698 - Assert causes smbd to panic on invalid NetBIOS session request.
Found by the CodeNomicon test suites at the SNIA plugfest. http://www.codenomicon.com/ If an invalid NetBIOS session request is received the code in name_len() in libsmb/nmblib.c can hit an assert. Re-write name_len() and name_extract() to use "buf/len" pairs and always limit reads. Jeremy.
Diffstat (limited to 'source3/smbd/process.c')
-rw-r--r--source3/smbd/process.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index b890687425..1ce4ca7263 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -1656,7 +1656,7 @@ static void process_smb(struct smbd_server_connection *conn,
/*
* NetBIOS session request, keepalive, etc.
*/
- reply_special(conn, (char *)inbuf);
+ reply_special(conn, (char *)inbuf, nread);
goto done;
}