blob: fe48e44d5589fb015b3a4c5b3fb136f9c548e539 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
Index: tetex-src-3.0/libs/t1lib/t1env.c
===================================================================
--- tetex-src-3.0.orig/libs/t1lib/t1env.c
+++ tetex-src-3.0/libs/t1lib/t1env.c
@@ -568,6 +568,12 @@ char *intT1_Env_GetCompletePath( char *F
#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: */
|