From fd96929ec1fa27e0affd4c4e9ba307c4ee30b978 Mon Sep 17 00:00:00 2001 From: Matthew Chapman Date: Fri, 12 Feb 1999 00:16:09 +0000 Subject: UNICODE cleanup (see lib/util_unistr.c). No more ugly static library buffers and all functions take a destination string length (especially unistrcpy was rather dangerous; we were only saved by the fact that datagrams are limited in size). (This used to be commit a1d39af1ce1d451b811dbd7c2ba391214851b87e) --- source3/rpc_parse/parse_reg.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'source3/rpc_parse/parse_reg.c') diff --git a/source3/rpc_parse/parse_reg.c b/source3/rpc_parse/parse_reg.c index 84d9650105..3aa9bbbc2a 100644 --- a/source3/rpc_parse/parse_reg.c +++ b/source3/rpc_parse/parse_reg.c @@ -769,19 +769,21 @@ void make_reg_r_info(REG_R_INFO *r_r, uint32 status) { char buf[512]; - int len = str_to_unistr8(buf, os_type); + int len; + + len = ascii_to_unibuf(buf, os_type, sizeof(buf)) - buf; r_r->ptr1 = 1; r_r->level = level; r_r->ptr_type = 1; - make_buffer2(&(r_r->uni_type), buf, len*2); + make_buffer2(&(r_r->uni_type), buf, len); r_r->ptr2 = 1; - r_r->unknown_0 = len*2; + r_r->unknown_0 = len; r_r->ptr3 = 1; - r_r->unknown_1 = len*2; + r_r->unknown_1 = len; r_r->status = status; } -- cgit