summaryrefslogtreecommitdiffstats
path: root/freebsd/dependencies/imlib/files/patch-fix-potential-buffer-overflow.diff
diff options
context:
space:
mode:
Diffstat (limited to 'freebsd/dependencies/imlib/files/patch-fix-potential-buffer-overflow.diff')
-rw-r--r--freebsd/dependencies/imlib/files/patch-fix-potential-buffer-overflow.diff19
1 files changed, 19 insertions, 0 deletions
diff --git a/freebsd/dependencies/imlib/files/patch-fix-potential-buffer-overflow.diff b/freebsd/dependencies/imlib/files/patch-fix-potential-buffer-overflow.diff
new file mode 100644
index 000000000..406aead10
--- /dev/null
+++ b/freebsd/dependencies/imlib/files/patch-fix-potential-buffer-overflow.diff
@@ -0,0 +1,19 @@
+Index: b/Imlib/load.c
+===================================================================
+--- a/Imlib/load.c
++++ b/Imlib/load.c
+@@ -1974,11 +1974,11 @@
+ if (iden[0])
+ {
+ #ifndef __EMX__
+- strncat(fil, ":", sizeof(fil) - strlen(fil));
++ strncat(fil, ":", sizeof(fil) - strlen(fil) - 1);
+ #else
+- strncat(fil, ";", sizeof(fil) - strlen(fil));
++ strncat(fil, ";", sizeof(fil) - strlen(fil) - 1);
+ #endif
+- strncat(fil, iden, sizeof(fil) - strlen(fil));
++ strncat(fil, iden, sizeof(fil) - strlen(fil) - 1);
+ }
+ }
+ im->mod.gamma = id->mod.gamma;