Commit Graph

63703 Commits

Author SHA1 Message Date
Niels Dossche
aef5250eae Merge branch 'PHP-8.2'
* PHP-8.2:
  Add missing error check on PEM_write_bio_PKCS7()
  Add missing error check on PEM_write_bio_CMS()
  Add missing error check on i2d_PKCS12_bio()
  Add missing error checks on EVP_MD_CTX_create() and EVP_VerifyInit()
2023-03-05 22:16:23 +01:00
Niels Dossche
a13cca8a81 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Add missing error check on PEM_write_bio_PKCS7()
  Add missing error check on PEM_write_bio_CMS()
  Add missing error check on i2d_PKCS12_bio()
  Add missing error checks on EVP_MD_CTX_create() and EVP_VerifyInit()
2023-03-05 22:12:36 +01:00
Niels Dossche
22c9e7e27e Add missing error check on PEM_write_bio_PKCS7()
Closes GH-10752.
2023-03-05 22:07:43 +01:00
nielsdos
51ea4a680d Add missing error check on PEM_write_bio_CMS()
On failure, this function returns 0. 2 other callers of this function
already check the return value, but this one was missed.
2023-03-05 22:06:23 +01:00
nielsdos
d2ef1561fb Add missing error check on i2d_PKCS12_bio()
This function returns 0 on error and 1 on success. The error case was
not checked and the function therefore would've returned true.
The only other caller of i2d_PKCS12_bio() in the file has
a correct error check.

Closes GH-10761.
2023-03-05 22:05:53 +01:00
Niels Dossche
30ebecb1d4 Add missing error checks on EVP_MD_CTX_create() and EVP_VerifyInit()
The first one returns NULL on error, and the second one returns 0 on
error. These weren't checked.

Closes GH-10762.
2023-03-05 22:05:11 +01:00
Ilija Tovilo
95fbd2039f
Fix -Wmaybe-uninitialized warning in JIT 2023-03-05 21:35:22 +01:00
Ilija Tovilo
ad7b90b674
Ignore -Warray-bounds compiler warning in JIT (#10789)
The out-of-bounds pointer is intentional.
2023-03-05 21:30:03 +01:00
Ilija Tovilo
9f1269a34e
[skip ci] fix typo in comment 2023-03-05 21:28:50 +01:00
Ilija Tovilo
5904952af9
Fix metaphone encode compiler warning
warning: array subscript -65 is below array bounds of ‘const char[26]‘
[-Warray-bounds]

Errors like these sometimes only appear with optimizations when inlining/loop
unrolling.

Closes GH-10788
2023-03-05 21:27:25 +01:00
Niels Dossche
43c71dfe52 Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix GH-10766: PharData archive created with Phar::Zip format does not keep files metadata (datetime)
2023-03-05 00:05:42 +01:00
Niels Dossche
d8294f2824 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix GH-10766: PharData archive created with Phar::Zip format does not keep files metadata (datetime)
2023-03-04 23:57:03 +01:00
Niels Dossche
e633be3e87 Fix GH-10766: PharData archive created with Phar::Zip format does not keep files metadata (datetime)
Due to an incorrect check, the datetime was never actually set.
To test this we need to write the file using phar, but read the file
using a different method to not get a cached, or a value that's been
transformed twice and is therefore accidentally correct.

Closes GH-10769
2023-03-04 23:43:48 +01:00
Alex Dowad
86ec0bc55c Fix failure of AVX2-accelerated mb_check_encoding on 32-bit MS Windows
Thanks to Ilija Tovilo for noticing and reporting this problem. Thanks
also to Michael Voříšek for finding the StackOverflow post which
explained the reason for the failure.
2023-03-04 20:42:41 +02:00
Tim Düsterhus
8abea1b3c2
random: Convert php_random_(bytes|int)_(silent|throw) into inline functions (#10763)
Compared to macros, inline functions are more robust and easier to debug.

Also, use true/false at the same time instead of 1 and 0.
2023-03-04 03:33:22 +00:00
David Carlier
244b883c07 Merge branch 'PHP-8.2' 2023-03-03 21:12:27 +00:00
David Carlier
eb9d556fd4 Merge branch 'PHP-8.1' into PHP-8.2 2023-03-03 21:12:04 +00:00
David Carlier
574a7e7ef8 ext/ftp fix ftp_nb_get signature (for failure).
ref: https://github.com/php/doc-en/pull/2331#issuecomment-1448984096

Closes GH-10760.
2023-03-03 21:08:16 +00:00
Ilija Tovilo
cfba9cd4bd
Merge branch 'PHP-8.2'
* PHP-8.2:
  Propagate success status of ftp_close() to userland
2023-03-03 15:26:51 +01:00
Ilija Tovilo
4c2ee6fa21
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Propagate success status of ftp_close() to userland
2023-03-03 15:26:45 +01:00
nielsdos
abc6fe8f2e
Propagate success status of ftp_close() to userland
The docs say that this function returns true on success, and false on
error. This function always returns true in the current implementation
because the success return value from ftp_close() is never propagated to
userland. This affects one test: since the test server exits after an
invalid login, the ftp close correctly fails (because the server has
gone away).
2023-03-03 15:26:11 +01:00
David Carlier
02e8c16dfd Merge branch 'PHP-8.2' 2023-03-03 12:45:10 +00:00
David Carlier
8b70393c23 Merge branch 'PHP-8.1' into PHP-8.2 2023-03-03 12:44:33 +00:00
David Carlier
ffc2a53a9b Fix GH-10728: opcache capstone header's inclusion.
Remove capstone include folder.
For most of the supported systems it worked fine somehow despite
 the pkg-config --cflags, but is always include it even on Linux.

Closes GH-10732.
2023-03-03 12:43:12 +00:00
Arnaud Le Blanc
0c7fc351ea Merge branch 'PHP-8.2'
* PHP-8.2:
  [ci skip] NEWS
  [ci skip] NEWS
  fix: support for timeouts with ZTS on Linux (#10141)
2023-03-03 11:56:34 +01:00
Arnaud Le Blanc
37030257b8 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  [ci skip] NEWS
  fix: support for timeouts with ZTS on Linux (#10141)
2023-03-03 11:45:50 +01:00
Kévin Dunglas
ad85e71421
fix: support for timeouts with ZTS on Linux (#10141) 2023-03-03 11:35:06 +01:00
Alex Dowad
e447036dc6 Merge branch 'PHP-8.2'
* PHP-8.2:
  Propagate error checks for mbfl_filt_conv_illegal_output()
  Use CK() macro to check the output function in mbfilter_unicode2sjis_emoji_sb()
  Make error checks on encoding methods for docomo, kddi, sb consistent
2023-03-02 23:12:09 +02:00
Alex Dowad
3142829562 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Propagate error checks for mbfl_filt_conv_illegal_output()
  Use CK() macro to check the output function in mbfilter_unicode2sjis_emoji_sb()
  Make error checks on encoding methods for docomo, kddi, sb consistent
2023-03-02 22:50:37 +02:00
nielsdos
d66ca5dabb Propagate error checks for mbfl_filt_conv_illegal_output() 2023-03-02 22:36:00 +02:00
nielsdos
263655a520 Use CK() macro to check the output function in mbfilter_unicode2sjis_emoji_sb() 2023-03-02 22:36:00 +02:00
nielsdos
69543e6a10 Make error checks on encoding methods for docomo, kddi, sb consistent
Some places use an if check, which implicitly checks for a non-zero
value, and some places use > 0. The > 0 is the correct one because at
least some of those functions already use the CK() macro to return -1 on
error. Because -1 != 0 this is wrongly interpreted as a success instead
of a failure.
2023-03-02 22:36:00 +02:00
Ilija Tovilo
86669774ae
Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix missing readonly modification error with inc/dec in JIT
2023-03-02 11:31:42 +01:00
Ilija Tovilo
7934a0fcfb
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix missing readonly modification error with inc/dec in JIT
2023-03-02 11:31:29 +01:00
Ilija Tovilo
df93146a15
Fix missing readonly modification error with inc/dec in JIT
Closes GH-10746
2023-03-02 11:29:53 +01:00
Ilija Tovilo
4ea869901f
[skip ci] Skip failing mbstring test on Windows x86 32-bit 2023-03-02 00:07:23 +01:00
Ilija Tovilo
5859297f7f
Merge branch 'PHP-8.2'
* PHP-8.2:
  Add Windows GitHub actions build
2023-03-01 23:05:24 +01:00
Ilija Tovilo
603367946b
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Add Windows GitHub actions build
2023-03-01 23:05:17 +01:00
Michael Voříšek
916b132ea0
Add Windows GitHub actions build
Closes GH-10664
2023-03-01 23:02:03 +01:00
Niels Dossche
2b15061fbb
Use zend_result in ext/spl where appropriate (#10734)
* Convert functions in spl_heap to return zend_result

* Convert functions in spl_iterators to return zend_result
2023-03-01 18:58:17 +01:00
Ilija Tovilo
da4167b918
Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix unescaped {TMP} variables in tests
2023-03-01 13:25:34 +01:00
Ilija Tovilo
2b5aac9303
Fix unescaped {TMP} variables in tests
On Windows {TMP} can return ~, which will result in a parse error
2023-03-01 13:24:39 +01:00
Ilija Tovilo
8c9c6787cc
Temporarily disable failing zlib tests on travis (#10738) 2023-03-01 02:19:29 +01:00
Dmitry Stogov
28be84a146 Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix Zend/tests/type_declarations/variance/class_order_autoload1.phpt test failre introduced by 44e5c04e55
2023-02-28 23:05:40 +03:00
Dmitry Stogov
dcf2810cd1 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix Zend/tests/type_declarations/variance/class_order_autoload1.phpt test failre introduced by 44e5c04e55
2023-02-28 23:05:30 +03:00
Dmitry Stogov
18b43d2950 Fix Zend/tests/type_declarations/variance/class_order_autoload1.phpt
test failre introduced by 44e5c04e55

This ASSERT-ion path was never reached becuase of the bug fixed by
44e5c04e55. It's possible in case of
circular class dependencies that may resolved by __autoload().
Unfortunately these circular dependencies can't be stored in the
inheritace cahce.
2023-02-28 22:57:52 +03:00
George Peter Banyard
f13d541ca6
Fix GCC 12 compiler warnings (#10713)
* Fix -Wunused-but-set-variable compiler warning in ext/mysqli

* Fix -Wstrict-prototypes compiler warning in ext/mysqlnd

* Fix -Wstrict-prototypes compiler warning in ext/soap

* Fix -Wunused-but-set-variable compiler warning in ext/exif

However, this code looks really sketchy...

* Fix -Wstrict-prototypes compiler warning in ext/openssl

* Fix -Wstrict-prototypes compiler warning in ext/dba

Add void to our bundled libraries

* Refactor bundled BCMath library

Fix -Wdeprecated-non-prototype compiler warnings
Use bool instead of char/int
Cleanup some useless header includes
2023-02-28 14:21:01 +00:00
David Carlier
02ec4c5071 Fix GH-10727: Spoofchecker constant updates.
- Adding MIXED_NUMBERS from ICU 58.
- Adding HIDDEN_OVERLAY from ICU 62.

Closes GH-10730.
2023-02-28 12:27:38 +00:00
Niels Dossche
4177257178
3 minor cleanups in ext/session (#10722)
* sid can never be NULL because it was NULL-checked earlier

* Change namelen to size_t because it is always unsigned and less in size than size_t

* Remove redundant check on ser

It can't be NULL, and even if it could, the ser++ would be UB.
2023-02-28 12:29:40 +01:00
Bob Weinand
145602f38e Fix bug in zend_test assuming null not being the first type
(I agree that null should come last, but then it should rather throw with a proper message than emit an undefined key warning.)

Signed-off-by: Bob Weinand <bobwei9@hotmail.com>
2023-02-28 12:01:41 +01:00