svn commit: samba r25274 - in branches: SAMBA_3_2/source/lib SAMBA_3_2_0/source/lib

vlendec at samba.org vlendec at samba.org
Fri Sep 21 10:23:35 GMT 2007


Author: vlendec
Date: 2007-09-21 10:23:35 +0000 (Fri, 21 Sep 2007)
New Revision: 25274

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25274

Log:
Attempt to fix RPC-SAMBA3-GETUSERNAME
Modified:
   branches/SAMBA_3_2/source/lib/util_unistr.c
   branches/SAMBA_3_2_0/source/lib/util_unistr.c


Changeset:
Modified: branches/SAMBA_3_2/source/lib/util_unistr.c
===================================================================
--- branches/SAMBA_3_2/source/lib/util_unistr.c	2007-09-21 09:58:36 UTC (rev 25273)
+++ branches/SAMBA_3_2/source/lib/util_unistr.c	2007-09-21 10:23:35 UTC (rev 25274)
@@ -361,7 +361,7 @@
 
 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 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;
 	}

Modified: branches/SAMBA_3_2_0/source/lib/util_unistr.c
===================================================================
--- branches/SAMBA_3_2_0/source/lib/util_unistr.c	2007-09-21 09:58:36 UTC (rev 25273)
+++ branches/SAMBA_3_2_0/source/lib/util_unistr.c	2007-09-21 10:23:35 UTC (rev 25274)
@@ -361,7 +361,7 @@
 
 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 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;
 	}



More information about the samba-cvs mailing list