Blame SOURCES/t1lib-5.1.2-segf.patch

8eea0a
diff -up t1lib-5.1.2/lib/t1lib/t1base.c.segf t1lib-5.1.2/lib/t1lib/t1base.c
8eea0a
--- t1lib-5.1.2/lib/t1lib/t1base.c.segf	2007-12-23 16:49:42.000000000 +0100
8eea0a
+++ t1lib-5.1.2/lib/t1lib/t1base.c	2008-01-12 01:43:42.000000000 +0100
8eea0a
@@ -455,7 +455,7 @@ int intT1_scanFontDBase( char *filename)
8eea0a
 	   to test_for_t1_file() filename is substituted by an emty
8eea0a
 	   string if the file was not found: */
8eea0a
 	sprintf( err_warn_msg_buf, "Type 1 Font file %s.[pfa/pfb] not found (FontID=%d, SearchPath=%s)",
8eea0a
-		 linebuf, m-1, T1_GetFileSearchPath(T1_PFAB_PATH));
8eea0a
+		 linebuf, m-1, intT1_GetFileSearchPath(T1_PFAB_PATH));
8eea0a
 	if ((test_for_t1_file( &linebuf[0]))){
8eea0a
 	  T1_PrintLog( "intT1_scanFontDBase()", err_warn_msg_buf, T1LOG_WARNING);
8eea0a
 	  located=0;
8eea0a
@@ -579,7 +579,7 @@ int intT1_scanFontDBaseXLFD( char *filen
8eea0a
 	   to test_for_t1_file() filename is substituted by an emty
8eea0a
 	   string if the file was not found: */
8eea0a
 	sprintf( err_warn_msg_buf, "Type 1 Font file %s.[pfa/pfb] not found (FontID=%d, SearchPath=%s)",
8eea0a
-		 linebuf, m-1, T1_GetFileSearchPath(T1_PFAB_PATH));
8eea0a
+		 linebuf, m-1, intT1_GetFileSearchPath(T1_PFAB_PATH));
8eea0a
 	if ((test_for_t1_file( &linebuf[0]))){
8eea0a
 	  T1_PrintLog( "intT1_scanFontDBase()", err_warn_msg_buf, T1LOG_WARNING);
8eea0a
 	  located=0;
8eea0a
diff -up t1lib-5.1.2/lib/t1lib/t1env.c.segf t1lib-5.1.2/lib/t1lib/t1env.c
8eea0a
--- t1lib-5.1.2/lib/t1lib/t1env.c.segf	2007-12-23 16:49:42.000000000 +0100
8eea0a
+++ t1lib-5.1.2/lib/t1lib/t1env.c	2008-01-12 01:43:42.000000000 +0100
8eea0a
@@ -818,6 +818,14 @@ char *T1_GetFileSearchPath( int type)
8eea0a
 
8eea0a
 }
8eea0a
 
8eea0a
+/* intT1_GetFileSearchPath(): 
8eea0a
+ call T1_GetFileSearchPath and truncate the line to avoid overflowing
8eea0a
+ error buffers*/ 
8eea0a
+char *intT1_GetFileSearchPath( int type)
8eea0a
+{
8eea0a
+   char  *res = T1_GetFileSearchPath(type);
8eea0a
+   res[900] = 0;
8eea0a
+}
8eea0a
 
8eea0a
 /* T1_AddToFileSearchPath(): Add the specified path element to
8eea0a
    the specified search path. If the existing path is the default path,
8eea0a
diff -up t1lib-5.1.2/lib/t1lib/t1load.c.segf t1lib-5.1.2/lib/t1lib/t1load.c
8eea0a
diff -up t1lib-5.1.2/lib/t1lib/t1env.h.segf t1lib-5.1.2/lib/t1lib/t1env.h
8eea0a
--- t1lib-5.1.2/lib/t1lib/t1env.h.segf	2007-12-23 16:49:42.000000000 +0100
8eea0a
+++ t1lib-5.1.2/lib/t1lib/t1env.h	2008-01-12 01:43:42.000000000 +0100
8eea0a
@@ -35,6 +35,7 @@ char *intT1_Env_GetCompletePath( char *F
8eea0a
 int T1_SetFileSearchPath( int type, char *pathname);
8eea0a
 int T1_AddToFileSearchPath( int pathtype, int mode, char *pathname);
8eea0a
 char *T1_GetFileSearchPath( int type);
8eea0a
+char *intT1_GetFileSearchPath( int type);
8eea0a
 int T1_SetFontDataBase( char *filename);
8eea0a
 int T1_AddFontDataBase( int mode, char *filename);
8eea0a
 int T1_SetFontDataBaseXLFD( char *filename);
8eea0a
@@ -49,6 +50,7 @@ extern char *intT1_Env_GetCompletePath( 
8eea0a
 extern int T1_SetFileSearchPath( int type, char *pathname);
8eea0a
 extern int T1_AddToFileSearchPath( int pathtype, int mode, char *pathname);
8eea0a
 extern char *T1_GetFileSearchPath( int type);
8eea0a
+extern char *intT1_GetFileSearchPath( int type);
8eea0a
 extern int T1_SetFontDataBase( char *filename);
8eea0a
 extern int T1_AddFontDataBase( int mode, char *filename);
8eea0a
 extern int T1_SetFontDataBaseXLFD( char *filename);