[SCM] Samba Shared Repository - branch v3-3-test updated - release-3-2-0pre2-4812-geb980cd

Volker Lendecke vlendec at samba.org
Mon Jan 12 09:51:08 GMT 2009


The branch, v3-3-test has been updated
       via  eb980cd213c9e2b0dc72ffd3c80efd54bef73c82 (commit)
      from  e4505156522560fb0c7ee3aadd75d4fc9d446609 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-3-test


- Log -----------------------------------------------------------------
commit eb980cd213c9e2b0dc72ffd3c80efd54bef73c82
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:
 source/lib/charcnv.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/lib/charcnv.c b/source/lib/charcnv.c
index 3ec3220..c3b3451 100644
--- a/source/lib/charcnv.c
+++ b/source/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