Merge branch 'PHP-8.1'

* PHP-8.1:
  [skip ci] Add NEWS entry
  Fix undefined behavior in php_set_inet6_addr
  Reduce the scope of XFAIL (#8592)
This commit is contained in:
Ilija Tovilo 2022-05-22 23:29:53 +02:00
commit 85d41da32a
No known key found for this signature in database
GPG key ID: A4F5D403F118200A
5 changed files with 7 additions and 1 deletions

View file

@ -10,6 +10,7 @@ opcache
--SKIPIF-- --SKIPIF--
<?php <?php
if (PHP_OS_FAMILY == 'Windows') die('skip Preloading is not supported on Windows'); if (PHP_OS_FAMILY == 'Windows') die('skip Preloading is not supported on Windows');
if (PHP_ZTS) die('xfail GH-8588');
?> ?>
--FILE-- --FILE--
<?php <?php

View file

@ -10,6 +10,7 @@ opcache
--SKIPIF-- --SKIPIF--
<?php <?php
if (PHP_OS_FAMILY == 'Windows') die('skip Preloading is not supported on Windows'); if (PHP_OS_FAMILY == 'Windows') die('skip Preloading is not supported on Windows');
if (PHP_ZTS) die('xfail GH-8588');
?> ?>
--FILE-- --FILE--
<?php <?php

View file

@ -10,6 +10,7 @@ opcache
--SKIPIF-- --SKIPIF--
<?php <?php
if (PHP_OS_FAMILY == 'Windows') die('skip Preloading is not supported on Windows'); if (PHP_OS_FAMILY == 'Windows') die('skip Preloading is not supported on Windows');
if (PHP_ZTS) die('xfail GH-8588');
?> ?>
--FILE-- --FILE--
<?php <?php

View file

@ -10,6 +10,7 @@ opcache
--SKIPIF-- --SKIPIF--
<?php <?php
if (PHP_OS_FAMILY == 'Windows') die('skip Preloading is not supported on Windows'); if (PHP_OS_FAMILY == 'Windows') die('skip Preloading is not supported on Windows');
if (PHP_ZTS) die('xfail GH-8588');
?> ?>
--FILE-- --FILE--
<?php <?php

View file

@ -60,11 +60,13 @@ int php_set_inet6_addr(struct sockaddr_in6 *sin6, char *string, php_socket *php_
} }
if (scope++) { if (scope) {
zend_long lval = 0; zend_long lval = 0;
double dval = 0; double dval = 0;
unsigned scope_id = 0; unsigned scope_id = 0;
scope++;
if (IS_LONG == is_numeric_string(scope, strlen(scope), &lval, &dval, 0)) { if (IS_LONG == is_numeric_string(scope, strlen(scope), &lval, &dval, 0)) {
if (lval > 0 && (zend_ulong)lval <= UINT_MAX) { if (lval > 0 && (zend_ulong)lval <= UINT_MAX) {
scope_id = lval; scope_id = lval;