summaryrefslogtreecommitdiff
path: root/ext/bz2
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2005-03-19 13:56:00 +0000
committerAntony Dovgal <tony2001@php.net>2005-03-19 13:56:00 +0000
commitf27fb2d715bad83a5d0bb349c636f062320ad789 (patch)
treefe6e4a2203cc349668171eb4705e6d55c17d7ec6 /ext/bz2
parentd23781e08d4ace718c601a0223c7656231789c3b (diff)
downloadphp-git-f27fb2d715bad83a5d0bb349c636f062320ad789.tar.gz
fix #32373 (segfault in bzopen('/wrong/path'))
Diffstat (limited to 'ext/bz2')
-rw-r--r--ext/bz2/bz2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/bz2/bz2.c b/ext/bz2/bz2.c
index 4718220205..7b5ab44e3a 100644
--- a/ext/bz2/bz2.c
+++ b/ext/bz2/bz2.c
@@ -196,7 +196,7 @@ PHP_BZ2_API php_stream *_php_stream_bz2open(php_stream_wrapper *wrapper,
/* remove the file created by php_stream_open_wrapper(), it is not needed since BZ2 functions
* failed.
*/
- if (!bz_file && mode[0] == 'w') {
+ if (opened_path && !bz_file && mode[0] == 'w') {
VCWD_UNLINK(*opened_path);
}
}