summaryrefslogtreecommitdiff
path: root/development/ming/patch-ming.c.diff
blob: 9465b562818b21ea4c17e1938d54c98b4dcc6f91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=662620
--- ming.c.orig	2011-10-26 01:33:18.000000000 -0500
+++ ming.c	2012-05-14 17:06:09.000000000 -0500
@@ -87,10 +87,17 @@
 static SWFMatrix getMatrix(zval *id TSRMLS_DC);
 #endif
 
+#if PHP_API_VERSION < 20100412
 #define PHP_MING_FILE_CHK(file) \
 	if ((PG(safe_mode) && !php_checkuid((file), NULL, CHECKUID_CHECK_FILE_AND_DIR)) || php_check_open_basedir((file) TSRMLS_CC)) {	\
 		RETURN_FALSE;	\
-	}	\
+	}
+#else
+#define PHP_MING_FILE_CHK(file) \
+	if (php_check_open_basedir((file) TSRMLS_CC)) {	\
+		RETURN_FALSE;	\
+	}
+#endif
 
 /* {{{ proto void ming_setcubicthreshold (int threshold)
    Set cubic threshold (?) */