diff options
| author | Jon Ashburn <jon@lunarg.com> | 2015-01-16 08:46:38 -0700 |
|---|---|---|
| committer | Courtney Goeltzenleuchter <courtney@LunarG.com> | 2015-02-04 17:58:07 -0700 |
| commit | d3941b54d7247831c765e75e5f5c04c66d061f78 (patch) | |
| tree | 8bd6dffd26e3c210a4b28299225826fa6268b86c | |
| parent | f65457f39c2fe229556e76816a9e7c5352636455 (diff) | |
| download | usermoji-d3941b54d7247831c765e75e5f5c04c66d061f78.tar.xz | |
loader: Fix infinite loop on layer library scan if dlopen fails
| -rw-r--r-- | loader/loader.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/loader/loader.c b/loader/loader.c index 8a0b3eb9..548a9aa3 100644 --- a/loader/loader.c +++ b/loader/loader.c @@ -435,8 +435,10 @@ static void layer_lib_scan(const char * libInPaths) if (!strncmp(dent->d_name, "libXGLLayer", strlen("libXGLLayer"))) { void * handle; snprintf(temp_str, sizeof(temp_str), "%s/%s",p,dent->d_name); - if ((handle = dlopen(temp_str, RTLD_LAZY)) == NULL) + if ((handle = dlopen(temp_str, RTLD_LAZY)) == NULL) { + dent = readdir(curdir); continue; + } if (loader.scanned_layer_count == MAX_LAYER_LIBRARIES) { loader_log(XGL_DBG_MSG_ERROR, 0, "%s ignored: max layer libraries exceed", temp_str); break; |
