freebsd-ports/graphics/tiff/files/patch-tiffsplit.c
Dirk Meyer f025b838e6 - add Security patches
- fix missign macro in manpages
- add regression test
Security: CVE-2006-2193
Security: CVE-2006-2327
Security: CVE-2006-2656
Security: CVE-2006-3459
Security: CVE-2006-3460
Security: CVE-2006-3461
Security: CVE-2006-3462
Security: CVE-2006-3463
Security: CVE-2006-3464
Security: CVE-2006-3465
Security: CVE-2008-2327
PR:		127434
Submitted by:	<bf2006a@yahoo.com>
Obtained From:	Gentoo,Debian
Approved by:	portmgr (marcus)
2008-09-20 07:33:20 +00:00

21 lines
635 B
C

CVE-2006-2656
===================================================================
--- tools/tiffsplit.c.orig 2008-08-17 13:03:49.014994263 -0400
+++ tools/tiffsplit.c 2008-08-17 13:03:52.726994578 -0400
@@ -61,14 +61,13 @@
return (-3);
}
if (argc > 2)
- strcpy(fname, argv[2]);
+ snprintf(fname, sizeof(fname), "%s", argv[2]);
in = TIFFOpen(argv[1], "r");
if (in != NULL) {
do {
char path[1024+1];
newfilename();
- strcpy(path, fname);
- strcat(path, ".tif");
+ snprintf(path, sizeof(path), "%s.tif", fname);
out = TIFFOpen(path, TIFFIsBigEndian(in)?"wb":"wl");
if (out == NULL)
return (-2);