[PHP-DEV] cvs: php3 /functions/ wddx_a.c From: Andrei Zmievski (andrei <email protected>)
Date: 05/25/00

andrei Thu May 25 14:20:30 2000 EDT

  Modified files:
    /php3/functions wddx_a.c
  Log:
  Fix buffer overflow.
  
  
Index: php3/functions/wddx_a.c
diff -u php3/functions/wddx_a.c:1.13 php3/functions/wddx_a.c:1.14
--- php3/functions/wddx_a.c:1.13 Sat Jan 1 05:31:17 2000
+++ php3/functions/wddx_a.c Thu May 25 14:20:29 2000
@@ -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))

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>