]> granicus.if.org Git - php/commit
Clear FG(user_stream_current_filename) when bailing out
authorSara Golemon <pollita@php.net>
Wed, 12 Oct 2016 04:14:25 +0000 (21:14 -0700)
committerSara Golemon <pollita@php.net>
Wed, 12 Oct 2016 04:55:01 +0000 (21:55 -0700)
commit43ccf23d700ae780451e257f5a66d4210f82f026
tree51dfeedc72897bd3a5b23afa99e04c2bbe444829
parent689a9b8def07875641b3132a82c701fb7acb676c
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
NEWS
ext/standard/tests/streams/user-stream-error.phpt [new file with mode: 0644]
main/streams/userspace.c