]> granicus.if.org Git - libass/commitdiff
ass_fontselect: ignore ./.. and hidden files
authorwm4 <wm4@nowhere>
Tue, 8 Sep 2015 17:45:07 +0000 (19:45 +0200)
committerwm4 <wm4@nowhere>
Tue, 8 Sep 2015 17:45:07 +0000 (19:45 +0200)
libass/ass_fontselect.c

index 7c023734a0efe948ec38efb3a82f69e217931276..ef7c36e0903457a4d010ec519712958b0d5e1e9b 100644 (file)
@@ -164,6 +164,8 @@ static void load_fonts_from_dir(ASS_Library *library, const char *dir)
         struct dirent *entry = readdir(d);
         if (!entry)
             break;
+        if (entry->d_name[0] == '.')
+            continue;
         char fullname[PATH_MAX];
         snprintf(fullname, sizeof(fullname), "%s/%s", dir, entry->d_name);
         size_t bufsize = 0;