]> granicus.if.org Git - php/commit
Reset MBREX(search_re) in RSHUTDOWN
authorNikita Popov <nikita.ppv@gmail.com>
Wed, 29 Jan 2020 15:03:44 +0000 (16:03 +0100)
committerNikita Popov <nikita.ppv@gmail.com>
Wed, 29 Jan 2020 15:05:11 +0000 (16:05 +0100)
commit560ff9725e6fb05942dd0c891c8a4496c57bcb4b
tree0e9edb80df73c6217e0de294a64b92715a4ffde2
parent392ad206a4f63fedf61d8086e390c73de8b72767
Reset MBREX(search_re) in RSHUTDOWN

This is going to cause a segfault if reused in the next request.
To illustrate the issue, run these two scripts in sequence with
the built-in server:

// script1.php
mb_ereg_search_init('foobar');
mb_ereg_search('foo');

// script2.php
var_dump(mb_ereg_search_init("foobar"));
var_dump(mb_ereg_search_pos());
ext/mbstring/php_mbregex.c