From 2d2c494970a32ac62f654360c6e140baed78f374 Mon Sep 17 00:00:00 2001 From: Andi Gutmans Date: Tue, 7 Mar 2000 15:50:51 +0000 Subject: [PATCH] - Thies, it is crucial :) --- ext/standard/dl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/standard/dl.c b/ext/standard/dl.c index 573a6d5d7e..369cb36a02 100644 --- a/ext/standard/dl.c +++ b/ext/standard/dl.c @@ -84,7 +84,7 @@ void php_dl(pval *file,int type,pval *return_value) && PG(extension_dir)[0]){ int extension_dir_len = strlen(PG(extension_dir)); - libpath = emalloc(extension_dir_len+strlen(file->value.str.val)+1); + libpath = emalloc(extension_dir_len+file->value.str.len+1); if (PG(extension_dir)[extension_dir_len-1]=='/' || PG(extension_dir)[extension_dir_len-1]=='\\') { sprintf(libpath,"%s%s",PG(extension_dir),file->value.str.val); @@ -92,7 +92,7 @@ void php_dl(pval *file,int type,pval *return_value) sprintf(libpath,"%s/%s",PG(extension_dir),file->value.str.val); } } else { - libpath = estrdup(file->value.str.val); + libpath = estrndup(file->value.str.val, file->value.str.len); } /* load dynamic symbol */ -- 2.50.1