stas Thu Sep 13 00:56:31 2007 UTC
Modified files: (Branch: PHP_5_2)
/php-src/ext/standard dl.c
Log:
docs say dl() parameter can be filename only - enforce it
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/dl.c?r1=1.106.2.1.2.2&r2=1.106.2.1.2.3&diff_format=u
Index: php-src/ext/standard/dl.c
diff -u php-src/ext/standard/dl.c:1.106.2.1.2.2
php-src/ext/standard/dl.c:1.106.2.1.2.3
--- php-src/ext/standard/dl.c:1.106.2.1.2.2 Fri Feb 23 00:37:35 2007
+++ php-src/ext/standard/dl.c Thu Sep 13 00:56:31 2007
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: dl.c,v 1.106.2.1.2.2 2007/02/23 00:37:35 iliaa Exp $ */
+/* $Id: dl.c,v 1.106.2.1.2.3 2007/09/13 00:56:31 stas Exp $ */
#include "php.h"
#include "dl.h"
@@ -125,6 +125,13 @@
if (extension_dir && extension_dir[0]){
int extension_dir_len = strlen(extension_dir);
+ if(type == MODULE_TEMPORARY) {
+ if(strchr(Z_STRVAL_P(file), '/') != NULL ||
strchr(Z_STRVAL_P(file), DEFAULT_SLASH) != NULL) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING,
"Temporary module name should contain only filename");
+ RETURN_FALSE;
+ }
+ }
+
if (IS_SLASH(extension_dir[extension_dir_len-1])) {
spprintf(&libpath, 0, "%s%s", extension_dir,
Z_STRVAL_P(file));
} else {
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php