summaryrefslogtreecommitdiff
path: root/ext/soap/php_encoding.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2006-12-25 22:36:57 +0000
committerIlia Alshanetsky <iliaa@php.net>2006-12-25 22:36:57 +0000
commit52d53543ac748489d108dc6988d02f51fd69b8d6 (patch)
tree224f13b4b4c89b139ed1bb7f9c3236c730f23d94 /ext/soap/php_encoding.c
parent9c2b6efb77637ec5cc35e6872d4ce4296021a2ea (diff)
downloadphp-git-52d53543ac748489d108dc6988d02f51fd69b8d6.tar.gz
Allocation safety checks
Diffstat (limited to 'ext/soap/php_encoding.c')
-rw-r--r--ext/soap/php_encoding.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/soap/php_encoding.c b/ext/soap/php_encoding.c
index 0f0b281c25..5b6acdcae3 100644
--- a/ext/soap/php_encoding.c
+++ b/ext/soap/php_encoding.c
@@ -974,7 +974,7 @@ static xmlNodePtr to_xml_double(encodeTypePtr type, zval *data, int style, xmlNo
convert_to_double(&tmp);
}
- str = (char *) emalloc(MAX_LENGTH_OF_DOUBLE + EG(precision) + 1);
+ str = (char *) safe_emalloc(EG(precision), 1, MAX_LENGTH_OF_DOUBLE + 1);
php_gcvt(Z_DVAL(tmp), EG(precision), '.', 'E', str);
xmlNodeSetContentLen(ret, BAD_CAST(str), strlen(str));
efree(str);