diff --git a/libtiff.spec b/libtiff.spec index 33e14ea..18266f8 100644 --- a/libtiff.spec +++ b/libtiff.spec @@ -5,6 +5,7 @@ Release: 2 License: distributable Group: System Environment/Libraries Source: ftp://ftp.remotesensing.org/pub/libtiff/tiff-%{version}.tar.gz +Patch0: tiffsplit-overflow.patch URL: http://www.libtiff.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: zlib-devel libjpeg-devel @@ -35,6 +36,7 @@ install the libtiff package. %prep %setup -q -n tiff-%{version} +%patch0 -p1 -b .overflow %build %configure @@ -80,6 +82,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man3/* %changelog +* Thu May 25 2006 Matthias Clasen - 3.8.2-1 +- Fix overflows in tiffsplit + * Wed Apr 26 2006 Matthias Clasen - 3.8.2-2 - Drop tiffgt to get rid of the libGL dependency (#190768) diff --git a/tiffsplit-overflow.patch b/tiffsplit-overflow.patch new file mode 100644 index 0000000..36a613f --- /dev/null +++ b/tiffsplit-overflow.patch @@ -0,0 +1,22 @@ +--- tiff-3.8.2/tools/tiffsplit.c.overflow 2006-05-25 22:37:11.000000000 -0400 ++++ tiff-3.8.2/tools/tiffsplit.c 2006-05-25 22:42:42.000000000 -0400 +@@ -60,14 +60,16 @@ + fprintf(stderr, "usage: tiffsplit input.tif [prefix]\n"); + return (-3); + } +- if (argc > 2) +- strcpy(fname, argv[2]); ++ if (argc > 2) { ++ strncpy(fname, argv[2], 1024); ++ fname[1024] = '\0'; ++ } + in = TIFFOpen(argv[1], "r"); + if (in != NULL) { + do { + char path[1024+1]; + newfilename(); +- strcpy(path, fname); ++ strncpy(path, fname, 1020); + strcat(path, ".tif"); + out = TIFFOpen(path, TIFFIsBigEndian(in)?"wb":"wl"); + if (out == NULL)