summaryrefslogtreecommitdiff
path: root/source4/smb_server/smb2
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2008-02-12 20:29:31 +1100
committerAndrew Tridgell <tridge@samba.org>2008-02-12 20:29:31 +1100
commitcd2b003abaaaed5054db6e266dbfccf7e1193932 (patch)
treeca519e5a69b67fa05ea815d82d1ce090dbfcc134 /source4/smb_server/smb2
parenta2505c5a2cc2b7b692ffbcdd8c6b86000a15d2c7 (diff)
downloadsamba-cd2b003abaaaed5054db6e266dbfccf7e1193932.tar.gz
samba-cd2b003abaaaed5054db6e266dbfccf7e1193932.tar.bz2
samba-cd2b003abaaaed5054db6e266dbfccf7e1193932.zip
fixed crash when 0 dialects (thanks metze!)
(This used to be commit 252bcf207b8117f325075cbb7bd05063756ac283)
Diffstat (limited to 'source4/smb_server/smb2')
-rw-r--r--source4/smb_server/smb2/negprot.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/smb_server/smb2/negprot.c b/source4/smb_server/smb2/negprot.c
index 4f44147606..7c295c05ab 100644
--- a/source4/smb_server/smb2/negprot.c
+++ b/source4/smb_server/smb2/negprot.c
@@ -94,8 +94,10 @@ static NTSTATUS smb2srv_negprot_backend(struct smb2srv_request *req, struct smb2
struct timeval boot_time;
/* we only do dialect 0 for now */
- if (io->in.dialect_count < 1 ||
- io->in.dialects[0] != 0) {
+ if (io->in.dialect_count < 1) {
+ return NT_STATUS_NOT_SUPPORTED;
+ }
+ if (io->in.dialects[0] != 0) {
DEBUG(0,("Got unexpected SMB2 dialect %u\n", io->in.dialects[0]));
}