[pull] master from php:master - #1248
Merged
Merged
Conversation
…23420) * ext/sodium: Add crypto_kem (X-Wing) bindings Expose the libsodium 1.0.22 generic KEM API (X-Wing, hybrid ML-KEM768+X25519). Guarded so older libsodium builds are unaffected. * ext/sodium: Add crypto_kem_mlkem768 bindings Expose libsodium 1.0.22's ML-KEM768 (FIPS 203) KEM with the same shape as the generic crypto_kem API. * ext/sodium: Test the KEM internal-error paths An invalid ML-KEM public key encoding and a small-order X25519 ciphertext component deterministically fail inside libsodium, exercising the memzero-on-error branches. ML-KEM768 decapsulation never fails (implicit rejection), so it has no such test. Also drop the cross-family length check, which duplicated existing coverage.
The move to memchr() in GH-21578 changed: `if (strchr(*path, '/') != NULL || strchr(*path, DEFAULT_SLASH) != NULL) {` to `if (memchr(ZSTR_VAL(*path), '/', ZSTR_LEN(*path)) != NULL || memchr(ZSTR_VAL(*path), '/', ZSTR_LEN(*path)) != NULL) {` instead of `if (memchr(ZSTR_VAL(*path), '/', ZSTR_LEN(*path)) != NULL || memchr(ZSTR_VAL(*path), DEFAULT_SLASH, ZSTR_LEN(*path)) != NULL) {` Fix this.
…ty class name (#23233) A class name consisting solely of the namespace separator passed the length check in zend_lookup_class_ex(), lost its leading backslash and was then looked up and autoloaded as an empty string. This affected all entry points using that lookup, e.g. is_callable('\::method') and class_exists('\').
php_fsockopen_stream() called zend_argument_value_error(6, ...) for the $timeout parameter, but $timeout is the 5th argument. This caused the error message to show "Argument #6" with no parameter name, since get_function_arg_name() returns NULL when arg_num exceeds the actual argument count. The format string also contained ZEND_ULONG_FMT (which expects a zend_ulong) but received a double expression, causing undefined behavior. This is fixed by casting to uint64_t instead.
Reduces size from 160 to 152 bytes
Number::compare() may request a scale greater than the stored scale of a zero result when the opposite operand has a larger scale. The helper then walked past the shorter digit buffer. Clamp the requested scale to the digits stored in the number. Closes GH-23185
* PHP-8.4: Clamp scale in bc_is_zero_for_scale to n_scale
* PHP-8.5: Clamp scale in bc_is_zero_for_scale to n_scale
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )