ae68a7
--- freetype-2.4.11/src/tools/ftrandom/ftrandom.c.orig	2009-03-14 14:45:26.000000000 +0100
ae68a7
+++ freetype-2.4.11/src/tools/ftrandom/ftrandom.c	2016-02-10 17:51:45.047340575 +0100
ae68a7
@@ -369,6 +369,11 @@
ae68a7
           }
ae68a7
 
ae68a7
           fontlist[fcnt].name = strdup( buffer );
ae68a7
+          if ( statb.st_size > LONG_MAX )
ae68a7
+          {
ae68a7
+              fprintf( stderr, "The file is too big\n" );
ae68a7
+              exit( 1 );
ae68a7
+          }
ae68a7
           fontlist[fcnt].len  = statb.st_size;
ae68a7
 
ae68a7
           figurefiletype( &fontlist[fcnt] );