Re: [PHP4BETA] CVS update: php4/ext/standard
| From: | Andrey Zmievski | Date: | Mon, 07 Jun 1999 16:25:35 +0000 |
| Subject: | Re: [PHP4BETA] CVS update: php4/ext/standard | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-1370@lists.php.net to get a copy of this message | ||
So, ereg_replace("^", "X", "") will return an empty string? This
behavior
does not seem correct. It should return "X" in that case.
zeev wrote:
> Modified Files:
> reg.c
> Log Message:
> Fix an ereg_replace() crash bug
>
> Index: php4/ext/standard/reg.c
> diff -u php4/ext/standard/reg.c:1.12 php4/ext/standard/reg.c:1.13
> --- php4/ext/standard/reg.c:1.12 Sat Jun 5 16:43:36 1999
> +++ php4/ext/standard/reg.c Mon Jun 7 11:01:25 1999
> @@ -28,7 +28,7 @@
> | Jaakko Hyvätti <jaakko@hyvatti.iki.fi>
|
>
+----------------------------------------------------------------------+
> */
> -/* $Id: reg.c,v 1.12 1999/06/05 20:43:36 andrey Exp $ */
> +/* $Id: reg.c,v 1.13 1999/06/07 15:01:25 zeev Exp $ */
>
> #include <stdio.h>
> #include "php.h"
> @@ -319,7 +319,7 @@
>
> string_len = strlen(string);
> if (!string_len)
> - return (char *)string;
> + return estrndup("", 0);
>
> if (icase)
> copts = REG_ICASE;
>
> --
> PHP 4 Beta
>
-- End of excerpt from zeev
-Andrey
* Entropy isn't what it used to be. *