cvs: php-src /ext/filter filter.c
| From: | Ilia Alshanetsky | Date: | Mon, 07 Aug 2006 16:54:16 +0000 |
| Subject: | cvs: php-src /ext/filter filter.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-39804@lists.php.net to get a copy of this message | ||
iliaa Mon Aug 7 16:54:16 2006 UTC
Modified files:
/php-src/ext/filter filter.c
Log:
Removed extra byte
http://cvs.php.net/viewvc.cgi/php-src/ext/filter/filter.c?r1=1.63&r2=1.64&diff_format=u
Index: php-src/ext/filter/filter.c
diff -u php-src/ext/filter/filter.c:1.63 php-src/ext/filter/filter.c:1.64
--- php-src/ext/filter/filter.c:1.63 Thu Aug 3 19:35:14 2006
+++ php-src/ext/filter/filter.c Mon Aug 7 16:54:16 2006
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: filter.c,v 1.63 2006/08/03 19:35:14 tony2001 Exp $ */
+/* $Id: filter.c,v 1.64 2006/08/07 16:54:16 iliaa Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -274,7 +274,7 @@
{
php_info_print_table_start();
php_info_print_table_row( 2, "Input Validation and Filtering", "enabled" );
- php_info_print_table_row( 2, "Revision", "$Revision: 1.63 $");
+ php_info_print_table_row( 2, "Revision", "$Revision: 1.64 $");
php_info_print_table_end();
DISPLAY_INI_ENTRIES();
@@ -362,7 +362,7 @@
/* FIXME: Should not use php_register_variable_ex as that also registers
* globals when register_globals is turned on */
Z_STRLEN(raw_var) = val_len;
- Z_STRVAL(raw_var) = estrndup(*val, val_len + 1);
+ Z_STRVAL(raw_var) = estrndup(*val, val_len);
Z_TYPE(raw_var) = IS_STRING;
php_register_variable_ex(var, &raw_var, array_ptr TSRMLS_CC);
@@ -376,7 +376,7 @@
Z_TYPE(new_var) = IS_STRING;
if (!(IF_G(default_filter) == FILTER_UNSAFE_RAW)) {
- Z_STRVAL(new_var) = estrndup(*val, val_len + 1);
+ Z_STRVAL(new_var) = estrndup(*val, val_len);
php_zval_filter(&new_var, IF_G(default_filter), IF_G(default_filter_flags), NULL,
NULL/*charset*/ TSRMLS_CC);
}
#if PHP_VERSION_ID<60000
@@ -385,7 +385,7 @@
}
#endif
else {
- Z_STRVAL(new_var) = estrndup(*val, val_len + 1);
+ Z_STRVAL(new_var) = estrndup(*val, val_len);
}
} else { /* empty string */
ZVAL_EMPTY_STRING(&new_var);
@@ -404,7 +404,7 @@
}
efree(*val);
if (Z_STRLEN(new_var)) {
- *val = estrndup(Z_STRVAL(new_var), Z_STRLEN(new_var) + 1);
+ *val = estrndup(Z_STRVAL(new_var), Z_STRLEN(new_var));
} else {
*val = estrdup("");
}