diff options
author | Matthew Chapman <matty@samba.org> | 1999-03-23 13:45:42 +0000 |
---|---|---|
committer | Matthew Chapman <matty@samba.org> | 1999-03-23 13:45:42 +0000 |
commit | 803100197bdd9d221a5807b3ca279ac6769e2e26 (patch) | |
tree | 30518d5cd78a1c75d16651a618cef123ffdf3ae5 /source3/rpc_parse/parse_misc.c | |
parent | 5380636c4e29268adf214634ed8f36cef6f1a35b (diff) | |
download | samba-803100197bdd9d221a5807b3ca279ac6769e2e26.tar.gz samba-803100197bdd9d221a5807b3ca279ac6769e2e26.tar.bz2 samba-803100197bdd9d221a5807b3ca279ac6769e2e26.zip |
Another UNICODE issue - this time BUFFER2 was being transmitted incorrectly.
(This used to be commit 73730f6004c7eca1d852a569dede94095a396dca)
Diffstat (limited to 'source3/rpc_parse/parse_misc.c')
-rw-r--r-- | source3/rpc_parse/parse_misc.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/source3/rpc_parse/parse_misc.c b/source3/rpc_parse/parse_misc.c index e4b7578e67..da6ff2c7f6 100644 --- a/source3/rpc_parse/parse_misc.c +++ b/source3/rpc_parse/parse_misc.c @@ -458,19 +458,17 @@ void smb_io_buffer3(char *desc, BUFFER3 *buf3, prs_struct *ps, int depth) /******************************************************************* creates a BUFFER2 structure. ********************************************************************/ -void make_buffer2(BUFFER2 *str, uint8 *buf, int len) +void make_buffer2(BUFFER2 *str, const char *buf, int len) { ZERO_STRUCTP(str); - /* max buffer size (allocated size) */ + /* set up string lengths. */ str->buf_max_len = len; str->undoc = 0; - str->buf_len = buf != NULL ? len : 0; + str->buf_len = len; - if (buf != NULL) - { - memcpy(str->buffer, buf, MIN(str->buf_len, sizeof(str->buffer))); - } + /* store the string (wide chars) */ + ascii_to_unistr(str->buffer, buf, len); } /******************************************************************* |