diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2003-08-18 04:41:48 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2003-08-18 04:41:48 +0000 |
commit | 741014089e3f834fdaeb99f7b568d48f3674518a (patch) | |
tree | bb4c53c62b8cb5ceb73821761d96d2d116315860 | |
parent | 4863dd532380f08002e1d3e2c1809031580cefcc (diff) | |
download | php-git-741014089e3f834fdaeb99f7b568d48f3674518a.tar.gz |
emalloc -> safe_emalloc
-rw-r--r-- | ext/com_dotnet/com_com.c | 2 | ||||
-rw-r--r-- | ext/com_dotnet/com_handlers.c | 2 | ||||
-rw-r--r-- | ext/com_dotnet/com_olechar.c | 4 | ||||
-rw-r--r-- | ext/odbc/birdstep.c | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/ext/com_dotnet/com_com.c b/ext/com_dotnet/com_com.c index 71ef8486df..8b296a755d 100644 --- a/ext/com_dotnet/com_com.c +++ b/ext/com_dotnet/com_com.c @@ -373,7 +373,7 @@ int php_com_do_invoke_by_id(php_com_dotnet_object *obj, DISPID dispid, int i; if (nargs) { - vargs = (VARIANT*)emalloc(sizeof(VARIANT) * nargs); + vargs = (VARIANT*)safe_emalloc(sizeof(VARIANT), nargs, 0); } /* Invoke'd args are in reverse order */ diff --git a/ext/com_dotnet/com_handlers.c b/ext/com_dotnet/com_handlers.c index baf129a91f..0e8337c1ec 100644 --- a/ext/com_dotnet/com_handlers.c +++ b/ext/com_dotnet/com_handlers.c @@ -353,7 +353,7 @@ static int com_call_method(char *method, INTERNAL_FUNCTION_PARAMETERS) nargs = ZEND_NUM_ARGS(); if (nargs) { - args = (zval **)emalloc(sizeof(zval *) * nargs); + args = (zval **)safe_emalloc(sizeof(zval *), nargs, 0); zend_get_parameters_array(ht, nargs, args); } diff --git a/ext/com_dotnet/com_olechar.c b/ext/com_dotnet/com_olechar.c index bbd87d3053..578f5cb544 100644 --- a/ext/com_dotnet/com_olechar.c +++ b/ext/com_dotnet/com_olechar.c @@ -45,7 +45,7 @@ PHPAPI OLECHAR *php_com_string_to_olestring(char *string, uint string_len, int c } if (strlen > 0) { - olestring = (OLECHAR*)emalloc(sizeof(OLECHAR) * string_len); + olestring = (OLECHAR*)safe_emalloc(sizeof(OLECHAR), string_len, 0); ok = MultiByteToWideChar(codepage, flags, string, string_len, olestring, string_len); } else { ok = FALSE; @@ -75,7 +75,7 @@ PHPAPI char *php_com_olestring_to_string(OLECHAR *olestring, uint *string_len, i length = WideCharToMultiByte(codepage, 0, olestring, -1, NULL, 0, NULL, NULL); if (length) { - string = (char*)emalloc(sizeof(char) * length); + string = (char*)safe_emalloc(sizeof(char), length, 0); length = WideCharToMultiByte(codepage, 0, olestring, -1, string, length, NULL, NULL); ok = length > 0; } else { diff --git a/ext/odbc/birdstep.c b/ext/odbc/birdstep.c index 8f764d8e06..db274d92c5 100644 --- a/ext/odbc/birdstep.c +++ b/ext/odbc/birdstep.c @@ -345,7 +345,7 @@ PHP_FUNCTION(birdstep_exec) efree(res); RETURN_LONG(rows); } else { /* Was SELECT query */ - res->values = (VResVal *)emalloc(sizeof(VResVal)*cols); + res->values = (VResVal *)safe_emalloc(sizeof(VResVal), cols, 0); res->numcols = cols; for ( i = 0; i < cols; i++ ) { SQLColAttributes(res->hstmt,i+1,SQL_COLUMN_NAME, |