Skip to content

php_stream_sock_open_from_socket could return NULL #9017

Closed
@zhou1615

Description

@zhou1615

Description

This bug is reported by a newly developed static tool, therefore it could be a false positive, please confirm.

the function _php_stream_sock_open_from_socket will return NULL once php_stream_alloc_rel returns NULL, however in the function zif_stream_socket_pair of ext/standard/streamsfuncs.c file, the return value of _php_stream_sock_open_from_socket is not checked before dereference, which could lead to NULL pointer dereference.

PHP Version

master

Operating System

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions