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

Jeremy Allison jra at samba.org
Fri Sep 21 10:29:51 GMT 2007


On Fri, Sep 21, 2007 at 10:23:35AM +0000, vlendec at samba.org wrote:
> 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

Thanks for looking at this, I'm only able to grab
small amounts of time from the conf. at the moment,

Wouldn't the following also help ?

Jeremy.
-------------- next part --------------
Index: lib/charcnv.c
===================================================================
--- lib/charcnv.c	(revision 25272)
+++ lib/charcnv.c	(working copy)
@@ -1403,15 +1403,18 @@
 {
 	size_t ret;
 
-	if (!src_len) {
-		return 0;
-	}
-
 	if (dest_len == (size_t)-1) {
 		/* No longer allow dest_len of -1. */
 		smb_panic("pull_ucs2 - invalid dest_len of -1");
 	}
 
+	if (!src_len) {
+		if (dest && dest_len > 0) {
+			dest[0] = '\0';
+		}
+		return 0;
+	}
+
 	if (ucs2_align(base_ptr, src, flags)) {
 		src = (const void *)((const char *)src + 1);
 		if (src_len != (size_t)-1)


More information about the samba-technical mailing list