From: Stanislav Malyshev Date: Wed, 21 Feb 2007 01:13:44 +0000 (+0000) Subject: Cosmetic fix - safe_emalloc(nmemb, size, offset) X-Git-Tag: php-5.2.2RC1~345 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=31a325823ae25684eccd11ca2c05da0965ab44fa;p=php Cosmetic fix - safe_emalloc(nmemb, size, offset) --- diff --git a/ext/com_dotnet/com_olechar.c b/ext/com_dotnet/com_olechar.c index 4e92cdd1af..d9e72ad46f 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 (string_len > 0) { - olestring = (OLECHAR*)safe_emalloc(sizeof(OLECHAR), string_len, 0); + olestring = (OLECHAR*)safe_emalloc(string_len, sizeof(OLECHAR), 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*)safe_emalloc(sizeof(char), length, 0); + string = (char*)safe_emalloc(length, sizeof(char), 0); length = WideCharToMultiByte(codepage, 0, olestring, -1, string, length, NULL, NULL); ok = length > 0; } else {