Blame SOURCES/freetype-2.9.1-covscan.patch

b4a942
--- freetype-2.9.1/builds/unix/freetype-config.in
b4a942
+++ freetype-2.9.1/builds/unix/freetype-config.in
b4a942
@@ -32,9 +32,6 @@ cflags=`%PKG_CONFIG% --cflags freetype2`
b4a942
 dynamic_libs=`pkgconf --libs freetype2`
b4a942
 static_libs=`pkgconf --static --libs freetype2`
b4a942
 
b4a942
-orig_prefix=$prefix
b4a942
-orig_exec_prefix=$exec_prefix
b4a942
-
b4a942
 orig_includedir=$includedir
b4a942
 orig_libdir=$libdir
b4a942
 
b4a942
--- freetype-2.9.1/ft2demos-2.9.1/src/ftbench.c
b4a942
+++ freetype-2.9.1/ft2demos-2.9.1/src/ftbench.c
b4a942
@@ -749,6 +749,7 @@
b4a942
         {
b4a942
           fprintf( stderr,
b4a942
                    "couldn't allocate memory to pre-load font file\n" );
b4a942
+          fclose( file );
b4a942
 
b4a942
           return 1;
b4a942
         }
b4a942
@@ -758,9 +759,12 @@
b4a942
           fprintf( stderr, "read error\n" );
b4a942
           free( memory_file );
b4a942
           memory_file = NULL;
b4a942
+          fclose( file );
b4a942
 
b4a942
           return 1;
b4a942
         }
b4a942
+
b4a942
+        fclose( file );
b4a942
       }
b4a942
 
b4a942
       error = FT_New_Memory_Face( lib,
b4a942
--- freetype-2.9.1/ft2demos-2.9.1/src/ftchkwd.c
b4a942
+++ freetype-2.9.1/ft2demos-2.9.1/src/ftchkwd.c
b4a942
@@ -118,8 +118,8 @@
b4a942
     FT_Library  library;
b4a942
 
b4a942
     int         i, file_index;
b4a942
-    char        filename[1024 + 4];
b4a942
-    char        alt_filename[1024 + 4];
b4a942
+    char        filename[1024 + 5];
b4a942
+    char        alt_filename[1024 + 5];
b4a942
     char*       execname;
b4a942
     char*       fname;
b4a942
 
b4a942
@@ -169,8 +169,8 @@
b4a942
 #ifndef macintosh
b4a942
       if ( i >= 0 )
b4a942
       {
b4a942
-        strncpy( filename + strlen( filename ), ".ttf", 4 );
b4a942
-        strncpy( alt_filename + strlen( alt_filename ), ".ttc", 4 );
b4a942
+        strncpy( filename + strlen( filename ), ".ttf", 5 );
b4a942
+        strncpy( alt_filename + strlen( alt_filename ), ".ttc", 5 );
b4a942
       }
b4a942
 #endif
b4a942
 
b4a942
--- freetype-2.9.1/ft2demos-2.9.1/src/ftcommon.c
b4a942
+++ freetype-2.9.1/ft2demos-2.9.1/src/ftcommon.c
b4a942
@@ -110,7 +110,10 @@
b4a942
 
b4a942
     if ( mode != gr_pixel_mode_gray  &&
b4a942
          mode != gr_pixel_mode_rgb24 )
b4a942
+    {
b4a942
+      free( display );
b4a942
       return NULL;
b4a942
+    }
b4a942
 
b4a942
     grInitDevices();
b4a942
 
b4a942
--- freetype-2.9.1/ft2demos-2.9.1/src/ftdump.c
b4a942
+++ freetype-2.9.1/ft2demos-2.9.1/src/ftdump.c
b4a942
@@ -775,8 +775,8 @@
b4a942
         char*  argv[] )
b4a942
   {
b4a942
     int    i, file;
b4a942
-    char   filename[1024 + 4];
b4a942
-    char   alt_filename[1024 + 4];
b4a942
+    char   filename[1024 + 5];
b4a942
+    char   alt_filename[1024 + 5];
b4a942
     char*  execname;
b4a942
     int    num_faces;
b4a942
     int    option;
b4a942
@@ -872,8 +872,8 @@
b4a942
 
b4a942
     if ( i >= 0 )
b4a942
     {
b4a942
-      strncpy( filename + strlen( filename ), ".ttf", 4 );
b4a942
-      strncpy( alt_filename + strlen( alt_filename ), ".ttc", 4 );
b4a942
+      strncpy( filename + strlen( filename ), ".ttf", 5 );
b4a942
+      strncpy( alt_filename + strlen( alt_filename ), ".ttc", 5 );
b4a942
     }
b4a942
 #endif
b4a942
 
b4a942
--- freetype-2.9.1/ft2demos-2.9.1/src/ftgrid.c
b4a942
+++ freetype-2.9.1/ft2demos-2.9.1/src/ftgrid.c
b4a942
@@ -662,6 +662,7 @@
b4a942
         break;
b4a942
 
b4a942
       default:
b4a942
+        free( t );
b4a942
         return;
b4a942
     }
b4a942
 
b4a942
--- freetype-2.9.1/ft2demos-2.9.1/src/ftlint.c
b4a942
+++ freetype-2.9.1/ft2demos-2.9.1/src/ftlint.c
b4a942
@@ -62,8 +62,8 @@
b4a942
   {
b4a942
     int           i, file_index;
b4a942
     unsigned int  id;
b4a942
-    char          filename[1024 + 4];
b4a942
-    char          alt_filename[1024 + 4];
b4a942
+    char          filename[1024 + 5];
b4a942
+    char          alt_filename[1024 + 5];
b4a942
     char*         execname;
b4a942
     char*         fname;
b4a942
 
b4a942
@@ -119,8 +119,8 @@
b4a942
 #ifndef macintosh
b4a942
       if ( i >= 0 )
b4a942
       {
b4a942
-        strncpy( filename + strlen( filename ), ".ttf", 4 );
b4a942
-        strncpy( alt_filename + strlen( alt_filename ), ".ttc", 4 );
b4a942
+        strncpy( filename + strlen( filename ), ".ttf", 5 );
b4a942
+        strncpy( alt_filename + strlen( alt_filename ), ".ttc", 5 );
b4a942
       }
b4a942
 #endif
b4a942
       i     = (int)strlen( filename );
b4a942
--- freetype-2.9.1/ft2demos-2.9.1/src/ftmemchk.c
b4a942
+++ freetype-2.9.1/ft2demos-2.9.1/src/ftmemchk.c
b4a942
@@ -227,8 +227,8 @@ int  main( int argc, char** argv )
b4a942
 {
b4a942
     int           i, file_index;
b4a942
     unsigned int  id;
b4a942
-    char          filename[1024 + 4];
b4a942
-    char          alt_filename[1024 + 4];
b4a942
+    char          filename[1024 + 5];
b4a942
+    char          alt_filename[1024 + 5];
b4a942
     char*         execname;
b4a942
     char*         fname;
b4a942
 
b4a942
@@ -270,8 +270,8 @@ int  main( int argc, char** argv )
b4a942
 #ifndef macintosh
b4a942
       if ( i >= 0 )
b4a942
       {
b4a942
-        strncpy( filename + strlen( filename ), ".ttf", 4 );
b4a942
-        strncpy( alt_filename + strlen( alt_filename ), ".ttc", 4 );
b4a942
+        strncpy( filename + strlen( filename ), ".ttf", 5 );
b4a942
+        strncpy( alt_filename + strlen( alt_filename ), ".ttc", 5 );
b4a942
       }
b4a942
 #endif
b4a942
       i     = strlen( filename );
b4a942
--- freetype-2.9.1/ft2demos-2.9.1/src/fttimer.c
b4a942
+++ freetype-2.9.1/ft2demos-2.9.1/src/fttimer.c
b4a942
@@ -162,8 +162,8 @@
b4a942
         char**  argv )
b4a942
   {
b4a942
     int    i, total, base, rendered_glyphs;
b4a942
-    char   filename[1024 + 4];
b4a942
-    char   alt_filename[1024 + 4];
b4a942
+    char   filename[1024 + 5];
b4a942
+    char   alt_filename[1024 + 5];
b4a942
 
b4a942
     long   t, t0, tz0;
b4a942
 
b4a942
@@ -230,8 +230,8 @@
b4a942
 
b4a942
     if ( i >= 0 )
b4a942
     {
b4a942
-      strncpy( filename + strlen( filename ), ".ttf", 4 );
b4a942
-      strncpy( alt_filename + strlen( alt_filename ), ".ttc", 4 );
b4a942
+      strncpy( filename + strlen( filename ), ".ttf", 5 );
b4a942
+      strncpy( alt_filename + strlen( alt_filename ), ".ttc", 5 );
b4a942
     }
b4a942
 
b4a942
     /* Initialize engine */