summaryrefslogtreecommitdiff
path: root/ext/standard/scanf.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2003-08-11 23:16:54 +0000
committerIlia Alshanetsky <iliaa@php.net>2003-08-11 23:16:54 +0000
commited40ae2650b2ea8bf79a40cd12b552ecc0b49ccf (patch)
tree2f37aa775874babc16b82f5c19a3d39165c3accf /ext/standard/scanf.c
parentf77f977d0ea747686426360cc70466cc4a8b0876 (diff)
downloadphp-git-ed40ae2650b2ea8bf79a40cd12b552ecc0b49ccf.tar.gz
emalloc -> safe_emalloc
Diffstat (limited to 'ext/standard/scanf.c')
-rw-r--r--ext/standard/scanf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/standard/scanf.c b/ext/standard/scanf.c
index a30f267135..832272134e 100644
--- a/ext/standard/scanf.c
+++ b/ext/standard/scanf.c
@@ -175,9 +175,9 @@ static char * BuildCharSet(CharSet *cset, char *format)
ch = end++;
}
- cset->chars = (char *) emalloc(sizeof(char) * (end - format - 1));
+ cset->chars = (char *) safe_emalloc(sizeof(char), (end - format - 1), 0);
if (nranges > 0) {
- cset->ranges = (struct Range *) emalloc(sizeof(struct Range)*nranges);
+ cset->ranges = (struct Range *) safe_emalloc(sizeof(struct Range), nranges, 0);
} else {
cset->ranges = NULL;
}
@@ -337,7 +337,7 @@ PHPAPI int ValidateFormat(char *format, int numVars, int *totalSubs)
*/
if (numVars > nspace) {
- nassign = (int*)emalloc(sizeof(int) * numVars);
+ nassign = (int*)safe_emalloc(sizeof(int), numVars, 0);
nspace = numVars;
}
for (i = 0; i < nspace; i++) {
@@ -513,7 +513,7 @@ PHPAPI int ValidateFormat(char *format, int numVars, int *totalSubs)
nspace += STATIC_LIST_SIZE;
}
if (nassign == staticAssign) {
- nassign = (void *)emalloc(nspace * sizeof(int));
+ nassign = (void *)safe_emalloc(nspace, sizeof(int), 0);
for (i = 0; i < STATIC_LIST_SIZE; ++i) {
nassign[i] = staticAssign[i];
}