summaryrefslogtreecommitdiff
path: root/ext/soap/php_encoding.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2004-03-18 02:16:35 +0000
committerIlia Alshanetsky <iliaa@php.net>2004-03-18 02:16:35 +0000
commitd0a480157966e0bc7579eb8963959f320f6a0ea4 (patch)
tree7d7d2524dbf121b2a53c15015f68f5d8d634d386 /ext/soap/php_encoding.c
parent5442d722c3b36cfc96a8baf82af8891885b7747f (diff)
downloadphp-git-d0a480157966e0bc7579eb8963959f320f6a0ea4.tar.gz
s/emalloc/safe_emalloc/ where appropriate.
Diffstat (limited to 'ext/soap/php_encoding.c')
-rw-r--r--ext/soap/php_encoding.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/soap/php_encoding.c b/ext/soap/php_encoding.c
index 35ba391304..d3e2b31d19 100644
--- a/ext/soap/php_encoding.c
+++ b/ext/soap/php_encoding.c
@@ -1362,7 +1362,7 @@ static int* get_position_12(int dimension, const char* str)
int *pos;
int i = -1, flag = 0;
- pos = emalloc(sizeof(int)*dimension);
+ pos = safe_emalloc(sizeof(int), dimension, 0);
memset(pos,0,sizeof(int)*dimension);
while (*str != '\0' && (*str < '0' || *str > '9') && (*str != '*')) {
str++;
@@ -1419,7 +1419,7 @@ static int* get_position(int dimension, const char* str)
{
int *pos;
- pos = emalloc(sizeof(int)*dimension);
+ pos = safe_emalloc(sizeof(int), dimension, 0);
get_position_ex(dimension, str, &pos);
return pos;
}
@@ -1557,7 +1557,7 @@ static xmlNodePtr to_xml_array(encodeTypePtr type, zval *data, int style, xmlNod
smart_str_appends(&array_type, value);
}
- dims = emalloc(sizeof(int)*dimension);
+ dims = safe_emalloc(sizeof(int), dimension, 0);
dims[0] = i;
el = &data;
for (i = 1; i < dimension; i++) {
@@ -1647,14 +1647,14 @@ static xmlNodePtr to_xml_array(encodeTypePtr type, zval *data, int style, xmlNod
smart_str_append_long(&array_size, i);
- dims = emalloc(sizeof(int)*dimension);
+ dims = safe_emalloc(sizeof(int), dimension, 0);
dims[0] = i;
} else {
get_array_type(xmlParam, data, &array_type TSRMLS_CC);
enc = get_encoder_ex(SOAP_GLOBAL(sdl), array_type.c, array_type.len);
smart_str_append_long(&array_size, i);
- dims = emalloc(sizeof(int)*dimension);
+ dims = safe_emalloc(sizeof(int), dimension, 0);
dims[0] = i;
}
@@ -1832,7 +1832,7 @@ static zval *to_zval_array(encodeTypePtr type, xmlNodePtr data)
dims = emalloc(sizeof(int));
*dims = 0;
}
- pos = emalloc(sizeof(int)*dimension);
+ pos = safe_emalloc(sizeof(int), dimension, 0);
memset(pos,0,sizeof(int)*dimension);
if (data &&
(attr = get_attribute(data->properties,"offset")) &&