From 7cbcb5f8c5bfd9bac6527232e7f5d011f03ed9ac Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 21 Sep 2007 10:23:35 +0000 Subject: r25274: Attempt to fix RPC-SAMBA3-GETUSERNAME (This used to be commit f6f64cf0b51f2fb841bd1c0f800c66114c213577) --- source3/lib/util_unistr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/lib/util_unistr.c') diff --git a/source3/lib/util_unistr.c b/source3/lib/util_unistr.c index a4952d137e..64cfd52120 100644 --- a/source3/lib/util_unistr.c +++ b/source3/lib/util_unistr.c @@ -361,7 +361,7 @@ int rpcstr_push(void* dest, const char *src, size_t dest_len, int flags) void unistr2_to_ascii(char *dest, const UNISTR2 *str, size_t maxlen) { - if (str == NULL) { + if ((str == NULL) || (str->uni_str_len == 0)) { *dest='\0'; return; } @@ -374,7 +374,7 @@ void unistr2_to_ascii(char *dest, const UNISTR2 *str, size_t maxlen) void unistr3_to_ascii(char *dest, const UNISTR3 *str, size_t maxlen) { - if (str == NULL) { + if ((str == NULL) || (str->uni_str_len == 0)) { *dest='\0'; return; } -- cgit