[Secure-testing-commits] r5684 - data/patches/MOPB
Sean Finney
seanius at alioth.debian.org
Thu Apr 19 22:06:12 UTC 2007
Author: seanius
Date: 2007-04-19 22:06:12 +0000 (Thu, 19 Apr 2007)
New Revision: 5684
Added:
data/patches/MOPB/MOPB-30-php5.diff
Log:
i believe this is a fix for mopb 30, needs testing against the PoC tho
Added: data/patches/MOPB/MOPB-30-php5.diff
===================================================================
--- data/patches/MOPB/MOPB-30-php5.diff 2007-04-19 20:57:57 UTC (rev 5683)
+++ data/patches/MOPB/MOPB-30-php5.diff 2007-04-19 22:06:12 UTC (rev 5684)
@@ -0,0 +1,37 @@
+--- old/ext/session/session.c 2006/12/04 15:58:48 1.417.2.8.2.20
++++ new/ext/session/session.c 2006/12/26 16:53:47 1.417.2.8.2.22
+@@ -583,16 +598,20 @@
+ zend_delete_global_variable("HTTP_SESSION_VARS", sizeof("HTTP_SESSION_VARS")-1 TSRMLS_CC);
+ zend_delete_global_variable("_SESSION", sizeof("_SESSION")-1 TSRMLS_CC);
+
++ if (PS(http_session_vars)) {
++ zval_ptr_dtor(&PS(http_session_vars));
++ }
++
+ MAKE_STD_ZVAL(session_vars);
+ array_init(session_vars);
+ PS(http_session_vars) = session_vars;
+
+ if (PG(register_long_arrays)) {
+- ZEND_SET_GLOBAL_VAR_WITH_LENGTH("HTTP_SESSION_VARS", sizeof("HTTP_SESSION_VARS"), PS(http_session_vars), 2, 1);
+- ZEND_SET_GLOBAL_VAR_WITH_LENGTH("_SESSION", sizeof("_SESSION"), PS(http_session_vars), 2, 1);
++ ZEND_SET_GLOBAL_VAR_WITH_LENGTH("HTTP_SESSION_VARS", sizeof("HTTP_SESSION_VARS"), PS(http_session_vars), 3, 1);
++ ZEND_SET_GLOBAL_VAR_WITH_LENGTH("_SESSION", sizeof("_SESSION"), PS(http_session_vars), 3, 1);
+ }
+ else {
+- ZEND_SET_GLOBAL_VAR_WITH_LENGTH("_SESSION", sizeof("_SESSION"), PS(http_session_vars), 1, 0);
++ ZEND_SET_GLOBAL_VAR_WITH_LENGTH("_SESSION", sizeof("_SESSION"), PS(http_session_vars), 2, 1);
+ }
+ }
+
+@@ -1828,6 +1847,10 @@
+
+ static void php_rshutdown_session_globals(TSRMLS_D)
+ {
++ if (PS(http_session_vars)) {
++ zval_ptr_dtor(&PS(http_session_vars));
++ PS(http_session_vars) = NULL;
++ }
+ if (PS(mod_data)) {
+ zend_try {
+ PS(mod)->s_close(&PS(mod_data) TSRMLS_CC);
More information about the Secure-testing-commits
mailing list