sesser          Sat Jun 26 03:57:37 2004 EDT

  Modified files:              
    /php-src/ext/mbstring       mb_gpc.c 
  Log:
  Fixed input_filter functions need emalloc()ed values.
  
  
http://cvs.php.net/diff.php/php-src/ext/mbstring/mb_gpc.c?r1=1.10&r2=1.11&ty=u
Index: php-src/ext/mbstring/mb_gpc.c
diff -u php-src/ext/mbstring/mb_gpc.c:1.10 php-src/ext/mbstring/mb_gpc.c:1.11
--- php-src/ext/mbstring/mb_gpc.c:1.10  Thu Jan  8 03:15:59 2004
+++ php-src/ext/mbstring/mb_gpc.c       Sat Jun 26 03:57:37 2004
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: mb_gpc.c,v 1.10 2004/01/08 08:15:59 andi Exp $ */
+/* $Id: mb_gpc.c,v 1.11 2004/06/26 07:57:37 sesser Exp $ */
 
 /* {{{ includes */
 #ifdef HAVE_CONFIG_H
@@ -343,10 +343,14 @@
                        val_len = len_list[n];
                }
                n++;
+               /* we need val to be emalloc()ed */
+               val = estrndup(val, val_len);
                if (sapi_module.input_filter(data_type, var, &val, val_len, 
&new_val_len TSRMLS_CC)) {
                        /* add variable to symbol table */
                        php_register_variable_safe(var, val, new_val_len, array_ptr 
TSRMLS_CC);
                }
+               efree(val);
+               
                if (convd != NULL){
                        mbfl_string_clear(&resvar);
                        mbfl_string_clear(&resval);

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

Reply via email to