summaryrefslogtreecommitdiff
path: root/source4/smbd
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-08-15 21:11:13 +0000
committerAndrew Tridgell <tridge@samba.org>2003-08-15 21:11:13 +0000
commit649f712f078aa42c590f0ee7f8e48a8dad9d8007 (patch)
tree176c842be8e887801ec10f35b8f253b5f0fd0116 /source4/smbd
parent039e9dc5e609f32b959b6120976e2c59534c659f (diff)
downloadsamba-649f712f078aa42c590f0ee7f8e48a8dad9d8007.tar.gz
samba-649f712f078aa42c590f0ee7f8e48a8dad9d8007.tar.bz2
samba-649f712f078aa42c590f0ee7f8e48a8dad9d8007.zip
ascii/unicode fixes in ascii mode found by smbtorture
(This used to be commit cdf2626a6d3b6eec419b0694d63272304c5c0eeb)
Diffstat (limited to 'source4/smbd')
-rw-r--r--source4/smbd/trans2.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source4/smbd/trans2.c b/source4/smbd/trans2.c
index 0838fb04f4..c870e2996c 100644
--- a/source4/smbd/trans2.c
+++ b/source4/smbd/trans2.c
@@ -917,7 +917,7 @@ static void find_fill_info(struct request_context *req,
SBVAL(data, 48, file->directory_info.alloc_size);
SIVAL(data, 56, file->directory_info.attrib);
trans2_append_data_string(req, trans, &file->directory_info.name,
- ofs + 60, 0);
+ ofs + 60, STR_TERMINATE_ASCII);
data = trans->out.data.data + ofs;
SIVAL(data, 0, trans->out.data.length - ofs);
break;
@@ -935,7 +935,7 @@ static void find_fill_info(struct request_context *req,
SIVAL(data, 56, file->full_directory_info.attrib);
SIVAL(data, 64, file->full_directory_info.ea_size);
trans2_append_data_string(req, trans, &file->full_directory_info.name,
- ofs + 60, 0);
+ ofs + 60, STR_TERMINATE_ASCII);
data = trans->out.data.data + ofs;
SIVAL(data, 0, trans->out.data.length - ofs);
break;
@@ -945,7 +945,7 @@ static void find_fill_info(struct request_context *req,
data = trans->out.data.data + ofs;
SIVAL(data, 4, file->name_info.file_index);
trans2_append_data_string(req, trans, &file->name_info.name,
- ofs + 8, 0);
+ ofs + 8, STR_TERMINATE_ASCII);
data = trans->out.data.data + ofs;
SIVAL(data, 0, trans->out.data.length - ofs);
break;
@@ -969,7 +969,7 @@ static void find_fill_info(struct request_context *req,
&file->both_directory_info.short_name,
24, STR_UNICODE | STR_LEN8BIT);
trans2_append_data_string(req, trans, &file->both_directory_info.name,
- ofs + 60, 0);
+ ofs + 60, STR_TERMINATE_ASCII);
data = trans->out.data.data + ofs;
SIVAL(data, 0, trans->out.data.length - ofs);
break;
@@ -990,7 +990,7 @@ static void find_fill_info(struct request_context *req,
SIVAL(data, 72, file->level_261.unknown[1]);
SIVAL(data, 76, file->level_261.unknown[2]);
trans2_append_data_string(req, trans, &file->level_261.name,
- ofs + 60, 0);
+ ofs + 60, STR_TERMINATE_ASCII);
data = trans->out.data.data + ofs;
SIVAL(data, 0, trans->out.data.length - ofs);
break;
@@ -1017,7 +1017,7 @@ static void find_fill_info(struct request_context *req,
SIVAL(data, 98, file->level_262.unknown[1]);
SSVAL(data, 102, 0); /* reserved? */
trans2_append_data_string(req, trans, &file->level_262.name,
- ofs + 60, 0);
+ ofs + 60, STR_TERMINATE_ASCII);
data = trans->out.data.data + ofs;
SIVAL(data, 0, trans->out.data.length - ofs);
break;