stas Fri Feb 23 20:40:55 2007 UTC
Modified files: (Branch: PHP_5_2)
/php-src/ext/soap php_sdl.c
Log:
use safe_emalloc
http://cvs.php.net/viewvc.cgi/php-src/ext/soap/php_sdl.c?r1=1.88.2.12.2.6&r2=1.88.2.12.2.7&diff_format=u
Index: php-src/ext/soap/php_sdl.c
diff -u php-src/ext/soap/php_sdl.c:1.88.2.12.2.6
php-src/ext/soap/php_sdl.c:1.88.2.12.2.7
--- php-src/ext/soap/php_sdl.c:1.88.2.12.2.6 Mon Jan 1 09:36:06 2007
+++ php-src/ext/soap/php_sdl.c Fri Feb 23 20:40:55 2007
@@ -17,7 +17,7 @@
| Dmitry Stogov <[EMAIL PROTECTED]> |
+----------------------------------------------------------------------+
*/
-/* $Id: php_sdl.c,v 1.88.2.12.2.6 2007/01/01 09:36:06 sebastian Exp $ */
+/* $Id: php_sdl.c,v 1.88.2.12.2.7 2007/02/23 20:40:55 stas Exp $ */
#include "php_soap.h"
#include "ext/libxml/php_libxml.h"
@@ -1250,7 +1250,7 @@
WSDL_CACHE_GET_INT(i, in);
if (i > 0) {
- elements = emalloc((i+1) * sizeof(sdlTypePtr));
+ elements = safe_emalloc((i+1), sizeof(sdlTypePtr), 0);
elements[0] = NULL;
type->elements = emalloc(sizeof(HashTable));
zend_hash_init(type->elements, i, NULL, delete_type, 0);
@@ -1479,7 +1479,7 @@
WSDL_CACHE_GET_INT(num_encoders, &in);
i = num_groups+num_types+num_elements;
- types = emalloc((i+1)*sizeof(sdlTypePtr));
+ types = safe_emalloc((i+1), sizeof(sdlTypePtr), 0);
types[0] = NULL;
while (i > 0) {
types[i] = emalloc(sizeof(sdlType));
@@ -1492,7 +1492,7 @@
while (enc->details.type != END_KNOWN_TYPES) {
i++; enc++;
}
- encoders = emalloc((i+1)*sizeof(encodePtr));
+ encoders = safe_emalloc((i+1), sizeof(encodePtr), 0);
i = num_encoders;
encoders[0] = NULL;
while (i > 0) {
@@ -1550,7 +1550,7 @@
/* deserialize bindings */
WSDL_CACHE_GET_INT(num_bindings, &in);
- bindings = emalloc(num_bindings*sizeof(sdlBindingPtr));
+ bindings = safe_emalloc(num_bindings, sizeof(sdlBindingPtr), 0);
if (num_bindings > 0) {
sdl->bindings = emalloc(sizeof(HashTable));
zend_hash_init(sdl->bindings, num_bindings, NULL,
delete_binding, 0);
@@ -1576,7 +1576,7 @@
WSDL_CACHE_GET_INT(num_func, &in);
zend_hash_init(&sdl->functions, num_func, NULL, delete_function, 0);
if (num_func > 0) {
- functions = emalloc(num_func*sizeof(sdlFunctionPtr));
+ functions = safe_emalloc(num_func, sizeof(sdlFunctionPtr), 0);
for (i = 0; i < num_func; i++) {
int binding_num, num_faults;
sdlFunctionPtr func = emalloc(sizeof(sdlFunction));
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php