evas - font dir fonts.alias - limit alias parse length
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>
Thu, 8 Jun 2017 05:48:08 +0000 (14:48 +0900)
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>
Thu, 8 Jun 2017 05:48:08 +0000 (14:48 +0900)
a rouge fonts.alias file in a font dir/path could contain long strings
that buffers dont have space for, so limit length of string.

@fix

src/lib/evas/canvas/evas_font_dir.c

index 8e0692d..2f4c859 100644 (file)
@@ -1246,7 +1246,7 @@ object_text_font_cache_dir_add(char *dir)
             char fname[4096], fdef[4096];
 
             /* read font alias lines */
-            while (fscanf(f, "%4090s %[^\n]\n", fname, fdef) == 2)
+            while (fscanf(f, "%4090s %4090[^\n]\n", fname, fdef) == 2)
               {
                  Evas_Font_Alias *fa;