We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a34de2a commit 38f7290Copy full SHA for 38f7290
ext/random/zend_utils.c
@@ -26,11 +26,10 @@ ZEND_ATTRIBUTE_NONNULL PHPAPI zend_result php_random_bytes_insecure_for_zend(
26
{
27
php_random_bytes_insecure_state_for_zend *state = (php_random_bytes_insecure_state_for_zend*) opaque_state;
28
29
- if (!state->initialized) {
+ if (UNEXPECTED(!state->initialized)) {
30
uint64_t t[4];
31
- php_random_fallback_seed_state fallback_state = {
32
- .initialized = false,
33
- };
+ php_random_fallback_seed_state fallback_state;
+ fallback_state.initialized = false;
34
35
do {
36
/* Skip the CSPRNG if it has already failed */
0 commit comments