- Fix an overflow in the PostScript backend (#217674, CVE-2006-5864)

This commit is contained in:
Matthias Clasen 2006-12-11 03:09:48 +00:00
parent e987a53965
commit e99c8d5b9a
2 changed files with 28 additions and 1 deletions

View File

@ -0,0 +1,22 @@
--- evince-0.6.0/ps/ps.c.overflow 2006-12-10 21:59:29.000000000 -0500
+++ evince-0.6.0/ps/ps.c 2006-12-10 21:59:34.000000000 -0500
@@ -1231,7 +1231,8 @@
int level = 0;
quoted = 1;
line++;
- while(*line && !(*line == ')' && level == 0)) {
+ while(*line && !(*line == ')' && level == 0)
+ && (cp - text) < PSLINELENGTH - 1) {
if(*line == '\\') {
if(*(line + 1) == 'n') {
*cp++ = '\n';
@@ -1302,7 +1303,8 @@
}
}
else {
- while(*line && !(*line == ' ' || *line == '\t' || *line == '\n'))
+ while(*line && !(*line == ' ' || *line == '\t' || *line == '\n')
+ && (cp - text) < PSLINELENGTH - 1)
*cp++ = *line++;
}
*cp = '\0';

View File

@ -4,7 +4,7 @@
Name: evince
Version: 0.6.1
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Document viewer
License: GPL
@ -12,6 +12,7 @@ Group: Applications/Publishing
URL: http://www.gnome.org/projects/evince/
Source0: http://ftp.gnome.org/pub/GNOME/sources/%{name}/%{version}/%{name}-%{version}.tar.bz2
Patch0: evince-0.6.0-print-error.patch
Patch1: evince-0.6.0-overflow.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: gtk2-devel >= %{gtk2_version}
@ -44,6 +45,7 @@ evince is a GNOME-based document viewer.
%prep
%setup -q
%patch0 -p1 -b .print-error
%patch1 -p1 -b .overflow
%build
%configure --disable-scrollkeeper
@ -129,6 +131,9 @@ fi
%changelog
* Sun Dec 10 2006 Matthias Clasen <mclasen@redhat.com> - 0.6.1-2
- Fix an overflow in the PostScript backend (#217674, CVE-2006-5864)
* Fri Oct 20 2006 Matthias Clasen <mclasen@redhat.com> - 0.6.1-1
- Update to 0.6.1