diff options
Diffstat (limited to 'source3/smbparse.c')
-rw-r--r-- | source3/smbparse.c | 8 |
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; } |