Skip to content

socket_import_file_descriptor return value not checked #18617

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
nielsdos opened this issue May 21, 2025 · 0 comments
Closed

socket_import_file_descriptor return value not checked #18617

nielsdos opened this issue May 21, 2025 · 0 comments

Comments

@nielsdos
Copy link
Member

Description

My static analyzer complains that failure is not checked here for the call to socket_import_file_descriptor:

socket_import_file_descriptor(fd, sock);

The function that calls socket_import_file_descriptor does not have a way to propagate failure, but it should probably call do_to_zval_err.

PHP Version

8.3+

Operating System

No response

devnexen added a commit to devnexen/php-src that referenced this issue May 21, 2025
to_zval_read_fd_array() helper when retrieving the socket protocol did
not check it.
devnexen added a commit to devnexen/php-src that referenced this issue May 21, 2025
to_zval_read_fd_array() helper when retrieving the socket protocol did
not check it.
@devnexen devnexen linked a pull request May 21, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants