blob: ec76de470af673fe1479ff66b01b4cbc760ae421 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
$NetBSD: patch-ai,v 1.1 2007/09/28 08:42:08 drochner Exp $
--- lib/t1lib/t1env.c.orig 2007-09-28 10:35:07.000000000 +0200
+++ lib/t1lib/t1env.c
@@ -611,6 +611,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: */
|