Skip to content

Commit

Permalink
Fix crash on Linux due to double fclose()
Browse files Browse the repository at this point in the history
  • Loading branch information
bwoebi committed Oct 3, 2016
1 parent 417a8ef commit 8908df6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sapi/phpdbg/phpdbg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1296,7 +1296,7 @@ php_stream *phpdbg_stream_url_wrap_php(php_stream_wrapper *wrapper, const char *
}

if (!strncasecmp(path, "stdin", 6) && PHPDBG_G(stdin_file)) {
php_stream *stream =stream = php_stream_fopen_from_file(PHPDBG_G(stdin_file), "r");
php_stream *stream = php_stream_fopen_from_fd(dup(fileno(PHPDBG_G(stdin_file))), "r", NULL);
#ifdef PHP_WIN32
zval *blocking_pipes = php_stream_context_get_option(context, "pipe", "blocking");
if (blocking_pipes) {
Expand Down

0 comments on commit 8908df6

Please sign in to comment.