dsp             Mon, 20 Jul 2009 10:12:12 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=284423

Changed paths:
        U   php/php-src/trunk/Zend/zend.c

Log:
- Fix overflow and use our internal vssprintf implementation

Modified: php/php-src/trunk/Zend/zend.c
===================================================================
--- php/php-src/trunk/Zend/zend.c       2009-07-20 09:52:54 UTC (rev 284422)
+++ php/php-src/trunk/Zend/zend.c       2009-07-20 10:12:12 UTC (rev 284423)
@@ -1546,7 +1546,6 @@
        zval *orig_user_error_handler;
        zend_bool in_compilation;
        zend_class_entry *saved_class_entry;
-       char dtrace_error_buffer[1024];
        TSRMLS_FETCH();

        /* Obtain relevant filename and lineno */
@@ -1592,9 +1591,11 @@
        va_start(args, format);

        if(DTRACE_ERROR_ENABLED()) {
-               vsprintf(dtrace_error_buffer, format, args);
+               char *dtrace_error_buffer;
+               zend_vspprintf(&dtrace_error_buffer, 0, format, args);
+               DTRACE_ERROR(dtrace_error_buffer, error_filename, error_lineno);
+               efree(dtrace_error_buffer);
        }
-       DTRACE_ERROR(dtrace_error_buffer, error_filename, error_lineno);


        /* if we don't have a user defined error handler */

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to