summaryrefslogtreecommitdiffstats
path: root/freebsd/dependencies/imlib/files/patch-fix-potential-buffer-overflow.diff
blob: 406aead1000624fd35bb2708c68a10b80a968541 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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;