summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2003-09-25 21:26:16 +0000
committerJeremy Allison <jra@samba.org>2003-09-25 21:26:16 +0000
commitd3b9384308e4b5130c9455b853edc4702d7af303 (patch)
tree026331069404a2dfd74d5d1443cf416d9ccaaa09 /source3/include
parent6c623b55bd023d9b2afa6ac3d69d814475a493e4 (diff)
downloadsamba-d3b9384308e4b5130c9455b853edc4702d7af303.tar.gz
samba-d3b9384308e4b5130c9455b853edc4702d7af303.tar.bz2
samba-d3b9384308e4b5130c9455b853edc4702d7af303.zip
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 f82c273a42f930c7152cfab84394781744815e0e)
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/rpc_lsa.h2
-rw-r--r--source3/include/rpc_misc.h8
2 files changed, 4 insertions, 6 deletions
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 */