diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2008-03-11 13:35:55 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2008-03-11 13:35:55 +0000 |
commit | 0c4cb56009a42d4f0c3b837315ac8ed09d4a63b9 (patch) | |
tree | 8946a21b49e01535c120b66a928ee4c3d30efd05 /winsup/cygwin/dlfcn.cc | |
parent | 4855f6c5170b6a3d731cad9a993d8798f661d179 (diff) | |
download | cygnal-0c4cb56009a42d4f0c3b837315ac8ed09d4a63b9.tar.gz cygnal-0c4cb56009a42d4f0c3b837315ac8ed09d4a63b9.tar.bz2 cygnal-0c4cb56009a42d4f0c3b837315ac8ed09d4a63b9.zip |
* dlfcn.cc (get_full_path_of_dll): Allow paths up to PATH_MAX.
(dlopen): Call get_full_path_of_dll with path buffer allocate by
tmp_pathbuf.
Diffstat (limited to 'winsup/cygwin/dlfcn.cc')
-rw-r--r-- | winsup/cygwin/dlfcn.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/winsup/cygwin/dlfcn.cc b/winsup/cygwin/dlfcn.cc index bcdc452ef..f00e09abd 100644 --- a/winsup/cygwin/dlfcn.cc +++ b/winsup/cygwin/dlfcn.cc @@ -23,6 +23,7 @@ details. */ #include "dlfcn.h" #include "dll_init.h" #include "cygtls.h" +#include "tls_pbuf.h" static void __stdcall set_dl_error (const char *str) @@ -48,7 +49,7 @@ get_full_path_of_dll (const char* str, char *name) int len = strlen (str); /* empty string or too long to be legal win32 pathname? */ - if (len == 0 || len >= CYG_MAX_PATH) + if (len == 0 || len >= PATH_MAX) return str; /* Yes. Let caller deal with it. */ const char *ret; @@ -91,7 +92,8 @@ dlopen (const char *name, int) ret = (void *) GetModuleHandle (NULL); /* handle for the current module */ else { - char buf[CYG_MAX_PATH]; + tmp_pathbuf tp; + char *buf = tp.c_get (); /* handle for the named library */ const char *fullpath = get_full_path_of_dll (name, buf); if (!fullpath) |