stas Thu Sep 13 01:16:24 2007 UTC
Modified files:
/php-src/ext/standard dl.c
Log:
MFB: docs say dl() parameter can be filename only - enforce it
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/dl.c?r1=1.114&r2=1.115&diff_format=u
Index: php-src/ext/standard/dl.c
diff -u php-src/ext/standard/dl.c:1.114 php-src/ext/standard/dl.c:1.115
--- php-src/ext/standard/dl.c:1.114 Tue May 29 21:24:45 2007
+++ php-src/ext/standard/dl.c Thu Sep 13 01:16:24 2007
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: dl.c,v 1.114 2007/05/29 21:24:45 tony2001 Exp $ */
+/* $Id: dl.c,v 1.115 2007/09/13 01:16:24 stas Exp $ */
#include "php.h"
#include "dl.h"
@@ -115,6 +115,13 @@
if (extension_dir && extension_dir[0]){
int extension_dir_len = strlen(extension_dir);
+ if(type == MODULE_TEMPORARY) {
+ if(strchr(filename, '/') != NULL || strchr(filename,
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, filename);
/* SAFE */
} else {
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php