diff options
author | Anatol Belski <ab@php.net> | 2016-12-12 01:51:17 +0100 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2016-12-12 01:51:17 +0100 |
commit | d0dc6ffda5e6c52bcc3a4765aea3468ac4f7d4c7 (patch) | |
tree | f4b5714b50212d2c6d14f0cc2f8726ac788b7357 | |
parent | b68cca260b72159d9afd828d4274a035fae5b937 (diff) | |
parent | 8199e5a7e933493e991f402923213b40d01896a9 (diff) | |
download | php-git-d0dc6ffda5e6c52bcc3a4765aea3468ac4f7d4c7.tar.gz |
Merge branch 'PHP-7.1'
* PHP-7.1:
adapt patch for 7.1
-rw-r--r-- | ext/com_dotnet/com_com.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/com_dotnet/com_com.c b/ext/com_dotnet/com_com.c index 86b3bd1dd5..68252daab0 100644 --- a/ext/com_dotnet/com_com.c +++ b/ext/com_dotnet/com_com.c @@ -53,6 +53,7 @@ PHP_FUNCTION(com_create_instance) &authid, EOAC_NONE }; zend_long cp = CP_ACP; + const struct php_win32_cp *cp_it; php_com_initialize(); obj = CDNO_FETCH(object); @@ -70,7 +71,8 @@ PHP_FUNCTION(com_create_instance) return; } - if (Z_L(0) > cp || ZEND_LONG_INT_OVFL(cp)) { + cp_it = php_win32_cp_get_by_id((DWORD)cp); + if (!cp_it) { php_com_throw_exception(E_INVALIDARG, "Could not create COM object - invalid codepage!"); return; } |