From 5400952f7f74d6e656fcf4ded173868ecec3cb77 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Mon, 29 Sep 2003 06:17:09 +0000 Subject: Merge from 3.0: >Fix for #480. Change the interface for init_unistr2 to not take a length >but a flags field. We were assuming that 2*strlen(mb_string) == length of ucs2-le string. >This is not the case. Count it after conversion. >Jeremy. (This used to be commit e2ab9e54cd0ec0002175cf18ff364f4aebaf85a0) --- source3/include/rpc_lsa.h | 2 -- source3/include/rpc_misc.h | 8 ++++---- 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'source3/include') diff --git a/source3/include/rpc_lsa.h b/source3/include/rpc_lsa.h index fa49d76c88..93bc08a0ce 100644 --- a/source3/include/rpc_lsa.h +++ b/source3/include/rpc_lsa.h @@ -728,5 +728,3 @@ typedef struct lsa_r_removeprivs #endif /* _RPC_LSA_H */ - - diff --git a/source3/include/rpc_misc.h b/source3/include/rpc_misc.h index f9dd15c36b..aaaad55c20 100644 --- a/source3/include/rpc_misc.h +++ b/source3/include/rpc_misc.h @@ -148,7 +148,7 @@ typedef struct bufhdr_info typedef struct buffer2_info { uint32 buf_max_len; - uint32 undoc; + uint32 offset; uint32 buf_len; /* unicode characters. ***MUST*** be little-endian. **NOT** necessarily null-terminated */ uint16 *buffer; @@ -173,7 +173,7 @@ typedef struct buffer5_info typedef struct unistr2_info { uint32 uni_max_len; - uint32 undoc; + uint32 offset; uint32 uni_str_len; /* unicode characters. ***MUST*** be little-endian. **must** be null-terminated and the uni_str_len should include @@ -185,7 +185,7 @@ typedef struct unistr2_info typedef struct string2_info { uint32 str_max_len; - uint32 undoc; + uint32 offset; uint32 str_str_len; uint8 *buffer; /* uint8 characters. **NOT** necessarily null-terminated */ } STRING2; @@ -403,5 +403,5 @@ typedef struct buffer4_info } BUFFER4; - +enum unistr2_term_codes { UNI_FLAGS_NONE = 0, UNI_STR_TERMINATE = 1, UNI_MAXLEN_TERMINATE = 2 }; #endif /* _RPC_MISC_H */ -- cgit