summaryrefslogtreecommitdiff
path: root/source3/smbparse.c
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1997-10-17 13:43:01 +0000
committerLuke Leighton <lkcl@samba.org>1997-10-17 13:43:01 +0000
commitf3c37f925ee06bbc76a89035b28dae0cf8c38088 (patch)
tree9536d7dd562090b0b58431cf5d4096ebca687d48 /source3/smbparse.c
parentf657f37b3a346dfe7e31bd2cb3e3c32551bceadf (diff)
downloadsamba-f3c37f925ee06bbc76a89035b28dae0cf8c38088.tar.gz
samba-f3c37f925ee06bbc76a89035b28dae0cf8c38088.tar.bz2
samba-f3c37f925ee06bbc76a89035b28dae0cf8c38088.zip
smbparse.c smb.h :
uni_max_len and uni_str_len are the other way round, in UNIHDR. util.c : increased the show_msg() data size from 256 bytes to 512 bytes: the LSA SAM Logon response can be about 500 bytes long. pipenetlog.c : forgot to set the authoritative field to 1. (This used to be commit 71c6678cd7ffe30a5da27766cf99147e1921feae)
Diffstat (limited to 'source3/smbparse.c')
-rw-r--r--source3/smbparse.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source3/smbparse.c b/source3/smbparse.c
index e5f455a408..de6ee7b90e 100644
--- a/source3/smbparse.c
+++ b/source3/smbparse.c
@@ -104,10 +104,14 @@ char* smb_io_unihdr(BOOL io, UNIHDR *hdr, char *q, char *base, int align, int de
q = align_offset(q, base, align);
- DBG_RW_SVAL("uni_max_len", depth, base, io, q, hdr->uni_max_len); q += 4;
- DBG_RW_SVAL("uni_str_len", depth, base, io, q, hdr->uni_str_len); q += 4;
+ DBG_RW_SVAL("uni_str_len", depth, base, io, q, hdr->uni_str_len); q += 2;
+ DBG_RW_SVAL("uni_max_len", depth, base, io, q, hdr->uni_max_len); q += 2;
DBG_RW_IVAL("undoc ", depth, base, io, q, hdr->undoc ); q += 4;
+ /* oops! XXXX maybe issue a warning that this is happening... */
+ if (hdr->uni_max_len > MAX_UNISTRLEN) hdr->uni_max_len = MAX_UNISTRLEN;
+ if (hdr->uni_str_len > MAX_UNISTRLEN) hdr->uni_str_len = MAX_UNISTRLEN;
+
return q;
}