[xdebug-dev] xdebug xdebug/xdebug_str.c

From: Derick Rethans <derick[@]derickrethans.nl>
Date: Sun, 28 Nov 2004 22:53:28 +0100

Date: Sun Nov 28 22:53:28 CET 2004
User: Derick Rethans
Directory: xdebug

Log Message:
- Fixed bug #94: xdebug_sprintf misbehaves with x86_64/glibc-2.3.3

Modified files:
           xdebug/xdebug_str.c (version: 1.6)

[FILE: /xdebug/xdebug_str.c]

===================================================================
RCS file: cvstemp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- xdebug/xdebug_str.c:1.5 Wed Dec 17 19:50:27 2003 GMT
+++ xdebug/xdebug_str.c Sun Nov 28 20:53:28 2004 GMT
@@ -88,9 +88,13 @@
 
         new_str = (char *) xdmalloc(size);
 
- va_start(args, fmt);
         for (;;) {
- int n = vsnprintf(new_str, size, fmt, args);
+ int n;
+
+ va_start(args, fmt);
+ n = vsnprintf(new_str, size, fmt, args);
+ va_end(args);
+
                 if (n > -1 && n < size) {
                         break;
                 }
@@ -101,7 +105,6 @@
                 }
                 new_str = (char *) xdrealloc(new_str, size);
         }
- va_end(args);
 
         return new_str;
 }
Received on Sun Nov 28 2004 - 22:53:31 GMT

This archive was generated by hypermail 2.2.0 : Sun Jun 24 2018 - 04:00:03 BST