* Changed a lot of strncpy() calls to safestrncpy() and replaced most of their
[citadel.git] / citadel / dynloader.c
index 1993328c8d60d9ce3816f9e9e0c7a71b99225aea..d11ca6790dcdf701cb98522fe80af0daa4e5112e 100644 (file)
@@ -94,7 +94,9 @@ void DLoader_Init(char *pathname)
                exit(1);
        }
        while ((dptr = readdir(dir)) != NULL) {
-               if (dptr->d_name[0] == '.')
+               if (strlen(dptr->d_name) < 4)
+                       continue;
+               if (strcasecmp(&dptr->d_name[strlen(dptr->d_name)-3], ".so"))
                        continue;
 
                snprintf(pathbuf, PATH_MAX, "%s/%s", pathname, dptr->d_name);