[SCM] Samba Shared Repository - branch master updated - ffb53c35748154081c1587b5f167721e32ff10f2

Volker Lendecke vlendec at samba.org
Mon Jan 12 09:52:14 GMT 2009


The branch, master has been updated
       via  ffb53c35748154081c1587b5f167721e32ff10f2 (commit)
      from  5d19187d3d69fff5c9c7551782adc18b5669c263 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit ffb53c35748154081c1587b5f167721e32ff10f2
Author: Volker Lendecke <vl at samba.org>
Date:   Sat Jan 10 17:59:43 2009 +0100

    Even for srclen == 0 we have to return something
    
    This fixes a regression reported by Corinna Vinschen <corinna at vinschen.de>
    
    Thanks,
    
    Volker

-----------------------------------------------------------------------

Summary of changes:
 source3/lib/charcnv.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/charcnv.c b/source3/lib/charcnv.c
index 3ec3220..c3b3451 100644
--- a/source3/lib/charcnv.c
+++ b/source3/lib/charcnv.c
@@ -547,6 +547,12 @@ bool convert_string_allocate(TALLOC_CTX *ctx, charset_t from, charset_t to,
 		return false;
 	}
 	if (srclen == 0) {
+		ob = ((ctx != NULL) ? talloc_strdup(ctx, "") : SMB_STRDUP(""));
+		if (ob == NULL) {
+			errno = ENOMEM;
+			return false;
+		}
+		*dest = ob;
 		*converted_size = 0;
 		return true;
 	}


-- 
Samba Shared Repository


More information about the samba-cvs mailing list