sesser Wed Nov 12 17:34:35 2003 EDT
Modified files: (Branch: PHP_4_3)
/php-src/main rfc1867.c
Log:
Fix odd increments to repair the boundary checks.
Index: php-src/main/rfc1867.c
diff -u php-src/main/rfc1867.c:1.122.2.15 php-src/main/rfc1867.c:1.122.2.16
--- php-src/main/rfc1867.c:1.122.2.15 Thu Nov 6 10:41:37 2003
+++ php-src/main/rfc1867.c Wed Nov 12 17:34:34 2003
@@ -16,7 +16,7 @@
| Jani Taskinen <[EMAIL PROTECTED]> |
+----------------------------------------------------------------------+
*/
-/* $Id: rfc1867.c,v 1.122.2.15 2003/11/06 15:41:37 hirokawa Exp $ */
+/* $Id: rfc1867.c,v 1.122.2.16 2003/11/12 22:34:34 sesser Exp $ */
/*
* This product includes software developed by the Apache Group
@@ -72,6 +72,10 @@
void php_mb_gpc_realloc_buffer(char ***pval_list, int **plen_list, int *num_vars_max,
int inc TSRMLS_DC)
{
+ /* allow only even increments */
+ if (inc & 1) {
+ inc++;
+ }
(*num_vars_max) += inc;
*pval_list = (char **)erealloc(*pval_list, (*num_vars_max+2)*sizeof(char *));
*plen_list = (int *)erealloc(*plen_list, (*num_vars_max+2)*sizeof(int));
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php