summaryrefslogtreecommitdiff
path: root/ext/soap
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2007-02-23 20:40:55 +0000
committerStanislav Malyshev <stas@php.net>2007-02-23 20:40:55 +0000
commit9d3e446d80e3bb6c53d8a1cadd5a7c837fe929ee (patch)
tree408c2c53110220a84f5f23c619fca1b31a2ddf2a /ext/soap
parentf3a9413b287e9adee449f035612a730f57c5a805 (diff)
downloadphp-git-9d3e446d80e3bb6c53d8a1cadd5a7c837fe929ee.tar.gz
use safe_emalloc
Diffstat (limited to 'ext/soap')
-rw-r--r--ext/soap/php_sdl.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/soap/php_sdl.c b/ext/soap/php_sdl.c
index f802284199..923215228f 100644
--- a/ext/soap/php_sdl.c
+++ b/ext/soap/php_sdl.c
@@ -1250,7 +1250,7 @@ static void sdl_deserialize_type(sdlTypePtr type, sdlTypePtr *types, encodePtr *
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 @@ static sdlPtr get_sdl_from_cache(const char *fn, const char *uri, time_t t, time
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 @@ static sdlPtr get_sdl_from_cache(const char *fn, const char *uri, time_t t, time
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 @@ static sdlPtr get_sdl_from_cache(const char *fn, const char *uri, time_t t, time
/* 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 @@ static sdlPtr get_sdl_from_cache(const char *fn, const char *uri, time_t t, time
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));