diff options
author | Gerald Carter <jerry@samba.org> | 2005-10-06 17:48:03 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:04:53 -0500 |
commit | 0bf72b6e330a76bee502cb36c1cb80c46d47d33c (patch) | |
tree | 565aaccd5faf27918b3fad5b3ac553cd14cec835 /source3/rpc_parse | |
parent | 6de37ee5f5d015904e650df3112cf725ab0f1cb8 (diff) | |
download | samba-0bf72b6e330a76bee502cb36c1cb80c46d47d33c.tar.gz samba-0bf72b6e330a76bee502cb36c1cb80c46d47d33c.tar.bz2 samba-0bf72b6e330a76bee502cb36c1cb80c46d47d33c.zip |
r10781: merging eventlog and svcctl code from trunk
(This used to be commit f10aa9fb84bfac4f1a22b74d63999668700ffaac)
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r-- | source3/rpc_parse/parse_misc.c | 4 | ||||
-rw-r--r-- | source3/rpc_parse/parse_ntsvcs.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/source3/rpc_parse/parse_misc.c b/source3/rpc_parse/parse_misc.c index 8bbb97f226..26da87b280 100644 --- a/source3/rpc_parse/parse_misc.c +++ b/source3/rpc_parse/parse_misc.c @@ -830,6 +830,8 @@ void init_unistr2(UNISTR2 *str, const char *buf, enum unistr2_term_codes flags) if (buf) { /* We always null terminate the copy. */ len = strlen(buf) + 1; + if ( flags == UNI_STR_DBLTERMINATE ) + len++; } else { /* no buffer -- nothing to do */ str->uni_max_len = 0; @@ -859,6 +861,8 @@ void init_unistr2(UNISTR2 *str, const char *buf, enum unistr2_term_codes flags) if (flags == UNI_STR_TERMINATE || flags == UNI_MAXLEN_TERMINATE) { num_chars++; } + if ( flags == UNI_STR_DBLTERMINATE ) + num_chars += 2; } str->uni_max_len = num_chars; diff --git a/source3/rpc_parse/parse_ntsvcs.c b/source3/rpc_parse/parse_ntsvcs.c index f2e4456025..24bf3a455b 100644 --- a/source3/rpc_parse/parse_ntsvcs.c +++ b/source3/rpc_parse/parse_ntsvcs.c @@ -79,7 +79,7 @@ BOOL ntsvcs_io_q_get_device_list_size(const char *desc, NTSVCS_Q_GET_DEVICE_LIST if ( !prs_pointer("devicename", ps, depth, (void**)&q_u->devicename, sizeof(UNISTR2), (PRS_POINTER_CAST)prs_io_unistr2) ) return False; - if( !prs_align(ps) ) + if ( !prs_align(ps) ) return False; if ( !prs_uint32("flags", ps, depth, &q_u->flags) ) |