Search
j0ke.net Open Build Service
>
Projects
>
internetx
:
php5
:
EL5
:
5.2.9
>
t1lib
> t1lib-5.1.2-segf.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File t1lib-5.1.2-segf.patch of Package t1lib
diff -up t1lib-5.1.2/lib/t1lib/t1base.c.segf t1lib-5.1.2/lib/t1lib/t1base.c --- t1lib-5.1.2/lib/t1lib/t1base.c.segf 2007-12-23 16:49:42.000000000 +0100 +++ t1lib-5.1.2/lib/t1lib/t1base.c 2008-01-12 01:43:42.000000000 +0100 @@ -455,7 +455,7 @@ int intT1_scanFontDBase( char *filename) to test_for_t1_file() filename is substituted by an emty string if the file was not found: */ sprintf( err_warn_msg_buf, "Type 1 Font file %s.[pfa/pfb] not found (FontID=%d, SearchPath=%s)", - linebuf, m-1, T1_GetFileSearchPath(T1_PFAB_PATH)); + linebuf, m-1, intT1_GetFileSearchPath(T1_PFAB_PATH)); if ((test_for_t1_file( &linebuf[0]))){ T1_PrintLog( "intT1_scanFontDBase()", err_warn_msg_buf, T1LOG_WARNING); located=0; @@ -579,7 +579,7 @@ int intT1_scanFontDBaseXLFD( char *filen to test_for_t1_file() filename is substituted by an emty string if the file was not found: */ sprintf( err_warn_msg_buf, "Type 1 Font file %s.[pfa/pfb] not found (FontID=%d, SearchPath=%s)", - linebuf, m-1, T1_GetFileSearchPath(T1_PFAB_PATH)); + linebuf, m-1, intT1_GetFileSearchPath(T1_PFAB_PATH)); if ((test_for_t1_file( &linebuf[0]))){ T1_PrintLog( "intT1_scanFontDBase()", err_warn_msg_buf, T1LOG_WARNING); located=0; diff -up t1lib-5.1.2/lib/t1lib/t1env.c.segf t1lib-5.1.2/lib/t1lib/t1env.c --- t1lib-5.1.2/lib/t1lib/t1env.c.segf 2007-12-23 16:49:42.000000000 +0100 +++ t1lib-5.1.2/lib/t1lib/t1env.c 2008-01-12 01:43:42.000000000 +0100 @@ -818,6 +818,14 @@ char *T1_GetFileSearchPath( int type) } +/* intT1_GetFileSearchPath(): + call T1_GetFileSearchPath and truncate the line to avoid overflowing + error buffers*/ +char *intT1_GetFileSearchPath( int type) +{ + char *res = T1_GetFileSearchPath(type); + res[900] = 0; +} /* T1_AddToFileSearchPath(): Add the specified path element to the specified search path. If the existing path is the default path, diff -up t1lib-5.1.2/lib/t1lib/t1load.c.segf t1lib-5.1.2/lib/t1lib/t1load.c diff -up t1lib-5.1.2/lib/t1lib/t1env.h.segf t1lib-5.1.2/lib/t1lib/t1env.h --- t1lib-5.1.2/lib/t1lib/t1env.h.segf 2007-12-23 16:49:42.000000000 +0100 +++ t1lib-5.1.2/lib/t1lib/t1env.h 2008-01-12 01:43:42.000000000 +0100 @@ -35,6 +35,7 @@ char *intT1_Env_GetCompletePath( char *F int T1_SetFileSearchPath( int type, char *pathname); int T1_AddToFileSearchPath( int pathtype, int mode, char *pathname); char *T1_GetFileSearchPath( int type); +char *intT1_GetFileSearchPath( int type); int T1_SetFontDataBase( char *filename); int T1_AddFontDataBase( int mode, char *filename); int T1_SetFontDataBaseXLFD( char *filename); @@ -49,6 +50,7 @@ extern char *intT1_Env_GetCompletePath( extern int T1_SetFileSearchPath( int type, char *pathname); extern int T1_AddToFileSearchPath( int pathtype, int mode, char *pathname); extern char *T1_GetFileSearchPath( int type); +extern char *intT1_GetFileSearchPath( int type); extern int T1_SetFontDataBase( char *filename); extern int T1_AddFontDataBase( int mode, char *filename); extern int T1_SetFontDataBaseXLFD( char *filename);