blob: 9f033c0debdde1ea27a744ef9fff381947f201ad (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
--- t1env.c.orig 2007-09-16 19:56:38.319184208 +0200
+++ t1env.c 2007-09-16 20:05:02.057070439 +0200
@@ -611,6 +611,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: */
|