mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
Prevent a crash when expand_filepath() fails.
This commit is contained in:
parent
3560cd83c0
commit
a326bde2e8
@ -100,7 +100,9 @@ PHPAPI php_stream *_php_stream_fopen(const char *filename, const char *mode, cha
|
||||
return NULL;
|
||||
}
|
||||
|
||||
realpath = expand_filepath(filename, NULL TSRMLS_CC);
|
||||
if ((realpath = expand_filepath(filename, NULL TSRMLS_CC)) == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (persistent) {
|
||||
spprintf(&persistent_id, 0, "streams_stdio_%d_%s", open_flags, realpath);
|
||||
|
Loading…
Reference in New Issue
Block a user