summaryrefslogtreecommitdiff
path: root/extra/t1lib/overflow.patch
diff options
context:
space:
mode:
Diffstat (limited to 'extra/t1lib/overflow.patch')
-rw-r--r--extra/t1lib/overflow.patch15
1 files changed, 15 insertions, 0 deletions
diff --git a/extra/t1lib/overflow.patch b/extra/t1lib/overflow.patch
new file mode 100644
index 000000000..9f033c0de
--- /dev/null
+++ b/extra/t1lib/overflow.patch
@@ -0,0 +1,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: */