http://secunia.com/advisories/26241/ http://www.bugtraq.ir/adv/t1lib.txt https://bugs.gentoo.org/193437 diff -Naur t1lib-5.0.2-orig/lib/t1lib/t1env.c t1lib-5.0.2/lib/t1lib/t1env.c --- t1lib-5.0.2-orig/lib/t1lib/t1env.c 2002-11-27 19:53:11.000000000 -0600 +++ t1lib-5.0.2/lib/t1lib/t1env.c 2007-09-22 12:57:01.000000000 -0600 @@ -568,6 +568,12 @@ #endif strcat( pathbuf, DIRECTORY_SEP); /* And finally the filename: */ + /* If current pathbuf + StrippedName + 1 byte for NULL is bigger than pathbuf + * let's try next pathbuf */ + if( strlen(pathbuf) + strlen(StrippedName) + 1 > sizeof(pathbuf) ) { + i++; + continue; + } strcat( pathbuf, StrippedName); /* Check for existence of the path: */