Skip to content

random: Fix check before closing random_fd - #10247

Merged
TimWolla merged 2 commits into
php:PHP-8.2from
TimWolla:random-close-random-fd
Jan 7, 2023
Merged

random: Fix check before closing random_fd#10247
TimWolla merged 2 commits into
php:PHP-8.2from
TimWolla:random-close-random-fd

Conversation

@TimWolla

@TimWolla TimWolla commented Jan 6, 2023

Copy link
Copy Markdown
Member

If, for whatever reason, the random_fd has been assigned file descriptor 0 it previously failed to close during module shutdown, thus leaking the descriptor.

If, for whatever reason, the random_fd has been assigned file descriptor `0` it
previously failed to close during module shutdown, thus leaking the descriptor.

@Girgias Girgias left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't forget to update the NEWS file when merging.

@cmb69 cmb69 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable. Thank you!

@TimWolla
TimWolla merged commit 32f503e into php:PHP-8.2 Jan 7, 2023
@TimWolla
TimWolla deleted the random-close-random-fd branch January 7, 2023 13:03
TimWolla added a commit to TimWolla/php-src that referenced this pull request Jan 7, 2023
* PHP-8.2:
  random: Fix check before closing `random_fd` (php#10247)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants