summaryrefslogtreecommitdiff
path: root/ext/standard/string.c
diff options
context:
space:
mode:
authorZeev Suraski <zeev@php.net>2000-01-29 17:54:30 +0000
committerZeev Suraski <zeev@php.net>2000-01-29 17:54:30 +0000
commit8a2f6c5e60c8fe59935ccbd8dcee9f04c7b8cac6 (patch)
tree4a2b59900791c9129d632daef914bc992400295d /ext/standard/string.c
parent8a75e48bd41ef4d92897c006752402fa3f69e2e1 (diff)
downloadphp-git-8a2f6c5e60c8fe59935ccbd8dcee9f04c7b8cac6.tar.gz
@- Fixed a crash bug in strtr() working on large input strings (Zeev)
Diffstat (limited to 'ext/standard/string.c')
-rw-r--r--ext/standard/string.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/standard/string.c b/ext/standard/string.c
index a12a04a9a6..8ebb5444d1 100644
--- a/ext/standard/string.c
+++ b/ext/standard/string.c
@@ -1215,7 +1215,7 @@ static void php_strtr_array(zval *return_value,char *str,int slen,HashTable *has
if ((newpos + tlen + 1) > newlen) {
newlen = newpos + tlen + 1 + 8192;
- newstr = realloc(newstr,newlen);
+ newstr = erealloc(newstr,newlen);
}
memcpy(newstr+newpos,tval,tlen);
@@ -1233,7 +1233,7 @@ static void php_strtr_array(zval *return_value,char *str,int slen,HashTable *has
if (! found) {
if ((newpos + 1) > newlen) {
newlen = newpos + 1 + 8192;
- newstr = realloc(newstr,newlen);
+ newstr = erealloc(newstr,newlen);
}
newstr[ newpos++ ] = str[ pos++ ];