com php-src: adapt patch for 7.1: ext/com_dotnet/com_com. c

From: Date: Mon, 12 Dec 2016 00:50:15 +0000
Subject: com php-src: adapt patch for 7.1: ext/com_dotnet/com_com. c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-96298@lists.php.net to get a copy of this message
Commit: 8199e5a7e933493e991f402923213b40d01896a9 Author: Anatol Belski <ab@php.net> Mon, 12 Dec 2016 01:50:15 +0100 Parents: e53f967ed77cef0dcacc66a3c022e35055475a95 Branches: PHP-7.1 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=8199e5a7e933493e991f402923213b40d01896a9 Log: adapt patch for 7.1 Changed paths: M ext/com_dotnet/com_com.c Diff: diff --git a/ext/com_dotnet/com_com.c b/ext/com_dotnet/com_com.c index 86b3bd1..68252da 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; }

« previous php.cvs (#96298) next »