diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2003-08-11 23:16:54 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2003-08-11 23:16:54 +0000 |
commit | ed40ae2650b2ea8bf79a40cd12b552ecc0b49ccf (patch) | |
tree | 2f37aa775874babc16b82f5c19a3d39165c3accf /ext/standard/file.c | |
parent | f77f977d0ea747686426360cc70466cc4a8b0876 (diff) | |
download | php-git-ed40ae2650b2ea8bf79a40cd12b552ecc0b49ccf.tar.gz |
emalloc -> safe_emalloc
Diffstat (limited to 'ext/standard/file.c')
-rw-r--r-- | ext/standard/file.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/standard/file.c b/ext/standard/file.c index 6b5c9a30ba..b59c79a802 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -953,7 +953,7 @@ PHPAPI PHP_FUNCTION(fgetc) php_stream_from_zval(stream, arg1); - buf = emalloc(2 * sizeof(char)); + buf = safe_emalloc(2, sizeof(char), 0); result = php_stream_getc(stream); @@ -1019,7 +1019,7 @@ PHPAPI PHP_FUNCTION(fgetss) } len = (size_t) Z_LVAL_PP(bytes); - buf = emalloc(sizeof(char) * (len + 1)); + buf = safe_emalloc(sizeof(char), (len + 1), 0); /*needed because recv doesnt set null char at end*/ memset(buf, 0, len + 1); } @@ -1055,7 +1055,7 @@ PHP_FUNCTION(fscanf) if (argCount < 2) { WRONG_PARAM_COUNT; } - args = (zval ***)emalloc(argCount * sizeof(zval **)); + args = (zval ***)safe_emalloc(argCount, sizeof(zval **), 0); if (zend_get_parameters_array_ex(argCount, args) == FAILURE) { efree( args ); WRONG_PARAM_COUNT; |