diff options
author | Ondřej Surý <ondrej@sury.org> | 2013-01-21 11:01:37 +0100 |
---|---|---|
committer | Ondřej Surý <ondrej@sury.org> | 2013-01-21 11:01:37 +0100 |
commit | 376784438a7c5ca87dd0b86450ef68bc2e0502a6 (patch) | |
tree | efd2e5c92dbb6732319905336ed6454c319bd6f0 | |
parent | 7837b81d56bb33134b8813da4de27c2e889b13c6 (diff) | |
download | php-376784438a7c5ca87dd0b86450ef68bc2e0502a6.tar.gz |
Apply two workaround patches for crashes caused by infinite recursion
in php_rfc1867_callback (Closes: #694473, #691318)
-rw-r--r-- | debian/patches/series | 1 | ||||
-rw-r--r-- | debian/patches/session.c_rfc1867_crashes_php_even_though_turned_off.patch | 33 |
2 files changed, 34 insertions, 0 deletions
diff --git a/debian/patches/series b/debian/patches/series index 315aac3de..96b5b6dbd 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -75,3 +75,4 @@ PHP-5.4.6-PHP62594-fix-segfault-in-mysqlnd.patch PHP-5.4.6-PHP62616-fix-segfault-in-SPL.patch PHP-5.4.6-PHP62653-fix-unset_array_float-crash.patch expose_all_built_and_installed_apis.patch +session.c_rfc1867_crashes_php_even_though_turned_off.patch diff --git a/debian/patches/session.c_rfc1867_crashes_php_even_though_turned_off.patch b/debian/patches/session.c_rfc1867_crashes_php_even_though_turned_off.patch new file mode 100644 index 000000000..0463887e4 --- /dev/null +++ b/debian/patches/session.c_rfc1867_crashes_php_even_though_turned_off.patch @@ -0,0 +1,33 @@ +--- a/ext/session/session.c ++++ b/ext/session/session.c +@@ -2192,8 +2192,10 @@ static PHP_MINIT_FUNCTION(session) /* {{ + #ifdef HAVE_LIBMM + PHP_MINIT(ps_mm) (INIT_FUNC_ARGS_PASSTHRU); + #endif +- php_session_rfc1867_orig_callback = php_rfc1867_callback; +- php_rfc1867_callback = php_session_rfc1867_callback; ++ if (php_rfc1867_callback != php_session_rfc1867_callback) { ++ php_session_rfc1867_orig_callback = php_rfc1867_callback; ++ php_rfc1867_callback = php_session_rfc1867_callback; ++ } + + /* Register interface */ + INIT_CLASS_ENTRY(ce, PS_IFACE_NAME, php_session_iface_functions); +@@ -2384,13 +2386,14 @@ static int php_session_rfc1867_callback( + php_session_rfc1867_progress *progress; + int retval = SUCCESS; + +- if (php_session_rfc1867_orig_callback) { +- retval = php_session_rfc1867_orig_callback(event, event_data, extra TSRMLS_CC); +- } + if (!PS(rfc1867_enabled)) { + return retval; + } + ++ if (php_session_rfc1867_orig_callback) { ++ retval = php_session_rfc1867_orig_callback(event, event_data, extra TSRMLS_CC); ++ } ++ + progress = PS(rfc1867_progress); + + switch(event) { |