Search
j0ke.net Open Build Service
>
Projects
>
home:netmax
:
rebuilds
>
php4
> php-4.3.9-CVE-2007-1583.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File php-4.3.9-CVE-2007-1583.patch of Package php4
--- php-4.3.9/ext/mbstring/mbstring.c.cve1583 +++ php-4.3.9/ext/mbstring/mbstring.c @@ -1894,9 +1894,9 @@ string.no_encoding = from_encoding; old_rg = PG(register_globals); if (argc == 1) { - PG(register_globals) = 1; + zend_alter_ini_entry("register_globals", sizeof("register_globals"), "1", sizeof("1")-1, PHP_INI_PERDIR, PHP_INI_STAGE_RUNTIME); } else { - PG(register_globals) = 0; + zend_alter_ini_entry("register_globals", sizeof("register_globals"), "0", sizeof("0")-1, PHP_INI_PERDIR, PHP_INI_STAGE_RUNTIME); } n = 0; while (n < num) { @@ -1925,7 +1925,11 @@ mbfl_string_clear(&resvar); mbfl_string_clear(&resval); } - PG(register_globals) = old_rg; + if (old_rg) { + zend_alter_ini_entry("register_globals", sizeof("register_globals"), "1", sizeof("1")-1, PHP_INI_PERDIR, PHP_INI_STAGE_RUNTIME); + } else { + zend_alter_ini_entry("register_globals", sizeof("register_globals"), "0", sizeof("0")-1, PHP_INI_PERDIR, PHP_INI_STAGE_RUNTIME); + } if (convd != NULL) { mbfl_buffer_converter_delete(convd);