diff options
author | Jeremy Allison <jra@samba.org> | 2010-09-27 18:21:46 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2010-09-27 18:24:53 -0700 |
commit | a738f5b846598fa3f44a7c6aa8019ef886bd1bb7 (patch) | |
tree | 7adc7998cde71dfa91eb4a04d4ee0df8b57ecab8 /source3/smbd/reply.c | |
parent | 38f505530ba06323a56c7d3914630efffcd12629 (diff) | |
download | samba-a738f5b846598fa3f44a7c6aa8019ef886bd1bb7.tar.gz samba-a738f5b846598fa3f44a7c6aa8019ef886bd1bb7.tar.xz samba-a738f5b846598fa3f44a7c6aa8019ef886bd1bb7.zip |
Small tweak to bugfix for 7698 - Assert causes smbd to panic on invalid NetBIOS session request.
Don't just fail to reply on a bad NBT name, just don't do the
internal action.
Jeremy.
Diffstat (limited to 'source3/smbd/reply.c')
-rw-r--r-- | source3/smbd/reply.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index abff317d523..f8c016b7f91 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -522,12 +522,12 @@ void reply_special(struct smbd_server_connection *sconn, char *inbuf, size_t inb name_len1 = name_len((unsigned char *)(inbuf+4),inbuf_size - 4); if (name_len1 <= 0 || name_len1 > inbuf_size - 4) { DEBUG(0,("Invalid name length in session request\n")); - return; + break; } name_len2 = name_len((unsigned char *)(inbuf+4+name_len1),inbuf_size - 4 - name_len1); if (name_len2 <= 0 || name_len2 > inbuf_size - 4 - name_len1) { DEBUG(0,("Invalid name length in session request\n")); - return; + break; } name_type1 = name_extract((unsigned char *)inbuf, @@ -537,7 +537,7 @@ void reply_special(struct smbd_server_connection *sconn, char *inbuf, size_t inb if (name_type1 == -1 || name_type2 == -1) { DEBUG(0,("Invalid name type in session request\n")); - return; + break; } DEBUG(2,("netbios connect: name1=%s0x%x name2=%s0x%x\n", |