Re: Possible bug in wddx_a.c in PHP-3.0.16
| From: | Andrei Zmievski | Date: | Thu, 25 May 2000 13:35:01 +0000 |
| Subject: | Re: Possible bug in wddx_a.c in PHP-3.0.16 | ||
| References: | 1 2 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-19427@lists.php.net to get a copy of this message | ||
On Thu, 25 May 2000, Joe Clarke wrote:
> Andrei, can you send me a patch? Thanks.
--- functions/wddx_a.c 2000/01/01 04:31:17 1.13
+++ functions/wddx_a.c 2000/05/25 12:20:29 1.14
@@ -27,7 +27,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: wddx_a.c,v 1.13 2000/01/01 04:31:17 sas Exp $ */
+/* $Id: wddx_a.c,v 1.14 2000/05/25 12:20:29 andrei Exp $ */
#include "php.h"
#include "internal_functions.h"
@@ -297,7 +297,7 @@
_php3_wddx_add_chunk(packet, WDDX_STRING_S);
i = 0;
- buf = (char *)emalloc(var->value.str.len);
+ buf = (char *)emalloc(var->value.str.len + 1);
for(c=var->value.str.val; *c!='\0'; c++)
{
if (iscntrl((int)*c))
-Andrei
The 3 great virtues of a programmer:
Laziness, Impatience, and Hubris.
--Larry Wall