Author: vlendec
Date: 2007-09-20 09:47:18 +0000 (Thu, 20 Sep 2007)
New Revision: 25255

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

Log:
Revert -r25116 in 3_0_MAINT on behalf of Jeremy

Modified:
   branches/SAMBA_3_0_MAINT/source/lib/talloc/talloc.c


Changeset:
Modified: branches/SAMBA_3_0_MAINT/source/lib/talloc/talloc.c
===================================================================
--- branches/SAMBA_3_0_MAINT/source/lib/talloc/talloc.c 2007-09-20 09:15:26 UTC 
(rev 25254)
+++ branches/SAMBA_3_0_MAINT/source/lib/talloc/talloc.c 2007-09-20 09:47:18 UTC 
(rev 25255)
@@ -1215,7 +1215,8 @@
  * accumulating output into a string buffer.
  **/
 char *talloc_vasprintf_append(char *s, const char *fmt, va_list ap)
-{
+{      
+       struct talloc_chunk *tc;
        int len, s_len;
        va_list ap2;
        char c;
@@ -1224,8 +1225,10 @@
                return talloc_vasprintf(NULL, fmt, ap);
        }
 
-       s_len = strlen(s);
+       tc = talloc_chunk_from_ptr(s);
 
+       s_len = tc->size - 1;
+
        va_copy(ap2, ap);
        len = vsnprintf(&c, 1, fmt, ap2);
        va_end(ap2);

Reply via email to