]> granicus.if.org Git - php/commitdiff
emalloc -> safe_emalloc
authorIlia Alshanetsky <iliaa@php.net>
Mon, 18 Aug 2003 04:41:48 +0000 (04:41 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Mon, 18 Aug 2003 04:41:48 +0000 (04:41 +0000)
ext/com_dotnet/com_com.c
ext/com_dotnet/com_handlers.c
ext/com_dotnet/com_olechar.c
ext/odbc/birdstep.c

index 71ef8486dfa9f3e54ce7eb15a1d9ba6d4c29f9ba..8b296a755da3eef9a225e0e0a0c120a2d2d2bd2f 100644 (file)
@@ -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 */
index baf129a91fe09747e3d2e9c13c81a502cb04c7b1..0e8337c1ece85406840f06751343d1f4f32c761c 100644 (file)
@@ -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);
        }
 
index bbd87d3053869df2857af28a6e8f4b5f89a1fee6..578f5cb544a2c14ce83139444a0f110bde620d76 100644 (file)
@@ -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 {
index 8f764d8e06172b9c225cca55d6830af14fa72c1d..db274d92c5eafd3cd65dda5b8e7c7be8e12768dc 100644 (file)
@@ -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,