fix overflows
This commit is contained in:
parent
5865c7246e
commit
80e6c42daf
@ -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 <mclasen@redhat.com> - 3.8.2-1
|
||||
- Fix overflows in tiffsplit
|
||||
|
||||
* Wed Apr 26 2006 Matthias Clasen <mclasen@redhat.com> - 3.8.2-2
|
||||
- Drop tiffgt to get rid of the libGL dependency (#190768)
|
||||
|
||||
|
22
tiffsplit-overflow.patch
Normal file
22
tiffsplit-overflow.patch
Normal file
@ -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)
|
Loading…
Reference in New Issue
Block a user