Clear FG(user_stream_current_filename) when bailing out
authorSara Golemon <pollita@php.net>
Wed, 12 Oct 2016 04:35:10 +0000 (21:35 -0700)
committerSara Golemon <pollita@php.net>
Wed, 12 Oct 2016 04:44:14 +0000 (21:44 -0700)
commit4d11a8eedf976f081dcc1b525c8a79ca18c9d67c
tree042a3f4b48b6de037da38cb194f17205cab835dd
parent1bdb30a429b3249f4dbd0a29b0da18bb3b57c6f1
Clear FG(user_stream_current_filename) when bailing out

If a userwrapper opener E_ERRORs then FG(user_stream_current_filename)
would remain set until the next request and would not be pointing
at unallocated memory.

Catch the bailout, clear the variable, then continue bailing.

Closes https://bugs.php.net/bug.php?id=73188
ext/standard/tests/streams/user-stream-error.phpt [new file with mode: 0644]
main/streams/userspace.c