[SCM] Samba Shared Repository - branch v4-0-test updated - release-4-0-0alpha2-1312-g842d144

Stefan Metzmacher metze at samba.org
Tue Mar 18 12:48:56 GMT 2008


The branch, v4-0-test has been updated
       via  842d144b4fb0981250157f72956e732709663107 (commit)
      from  903eb9a23d80576f5df2d90a0e025f2366ffe4c6 (commit)

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


- Log -----------------------------------------------------------------
commit 842d144b4fb0981250157f72956e732709663107
Author: Volker Lendecke <vl at samba.org>
Date:   Sat Mar 15 21:47:22 2008 +0100

    Allocate one 0-byte in asprintf replacement when len==0
    
    Some S3 code depends on this.
    (cherry picked from commit dc3d5e16452bf30055638ba3cfe99097fb557156)

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

Summary of changes:
 source/lib/replace/snprintf.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/lib/replace/snprintf.c b/source/lib/replace/snprintf.c
index 9f8a765..a174dcf 100644
--- a/source/lib/replace/snprintf.c
+++ b/source/lib/replace/snprintf.c
@@ -1264,7 +1264,7 @@ static int add_cnk_list_entry(struct pr_chunk_x **list,
 	VA_COPY(ap2, ap);
 	ret = vsnprintf(NULL, 0, format, ap2);
 	va_end(ap2);
-	if (ret <= 0) return ret;
+	if (ret < 0) return ret;
 
 	(*ptr) = (char *)malloc(ret+1);
 	if (!*ptr) return -1;


-- 
Samba Shared Repository


More information about the samba-cvs mailing list