Make sure xScale and yScale are always initialized

Resolves: #840515
This commit is contained in:
Marek Kasik 2012-08-06 16:36:07 +02:00
parent a6f66b626c
commit bb6ca18d5b
2 changed files with 55 additions and 1 deletions

View File

@ -0,0 +1,45 @@
commit dcbc923bd3592a81876f84005fbaddcea18641cc
Author: Thomas Freitag <Thomas.Freitag@alfa.de>
Date: Sun Jul 22 18:40:46 2012 +0200
Make sure xScale and yScale are always initialized
Bug #52215
diff --git a/poppler/PSOutputDev.cc b/poppler/PSOutputDev.cc
index a01a4b3..e15c2e9 100644
--- a/poppler/PSOutputDev.cc
+++ b/poppler/PSOutputDev.cc
@@ -3521,6 +3521,7 @@ void PSOutputDev::startPage(int pageNum, GfxState *state) {
saveState(NULL);
}
+ xScale = yScale = 1;
switch (mode) {
case psModePSOrigPageSizes:
@@ -3631,8 +3632,6 @@ void PSOutputDev::startPage(int pageNum, GfxState *state) {
} else {
yScale = xScale;
}
- } else {
- xScale = yScale = 1;
}
// deal with odd bounding boxes or clipping
if (clipLLX0 < clipURX0 && clipLLY0 < clipURY0) {
@@ -3694,7 +3693,6 @@ void PSOutputDev::startPage(int pageNum, GfxState *state) {
if (tx != 0 || ty != 0) {
writePSFmt("{0:.6g} {1:.6g} translate\n", tx, ty);
}
- xScale = yScale = 1;
break;
case psModeForm:
@@ -3702,7 +3700,6 @@ void PSOutputDev::startPage(int pageNum, GfxState *state) {
writePS("begin xpdf begin\n");
writePS("pdfStartPage\n");
tx = ty = 0;
- xScale = yScale = 1;
rotate = 0;
break;
}

View File

@ -2,7 +2,7 @@
Summary: PDF rendering library
Name: poppler
Version: 0.20.2
Release: 1%{?dist}
Release: 2%{?dist}
License: GPLv2 or GPLv3
Group: Development/Libraries
URL: http://poppler.freedesktop.org/
@ -17,6 +17,10 @@ Patch1: poppler-0.12.4-annot-appearance.patch
# https://bugs.freedesktop.org/show_bug.cgi?id=3498
Patch2: poppler-0.20.1-empty-password.patch
# http://bugzilla.redhat.com/show_bug.cgi?id=840515
# https://bugs.freedesktop.org/show_bug.cgi?id=52215
Patch3: poppler-0.20.2-scale-init.patch
Requires: poppler-data >= 0.4.0
BuildRequires: automake libtool
BuildRequires: gettext-devel
@ -125,6 +129,7 @@ converting PDF files to a number of other formats.
#patch1 -p1 -b .annot
%patch2 -p1 -b .empty-password
%patch3 -p1 -b .scale-init
chmod -x goo/GooTimer.h
@ -245,6 +250,10 @@ test "$(pkg-config --modversion poppler-splash)" = "%{version}"
%changelog
* Mon Aug 6 2012 Marek Kasik <mkasik@redhat.com> 0.20.2-2
- Make sure xScale and yScale are always initialized
- Resolves: #840515
* Mon Aug 6 2012 Marek Kasik <mkasik@redhat.com> 0.20.2-1
- Update to 0.20.2