[poppler] poppler/SplashOutputDev.cc
Albert Astals Cid
aacid at kemper.freedesktop.org
Mon Feb 7 11:47:56 PST 2011
poppler/SplashOutputDev.cc | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
New commits:
commit 37077aa475d2dee81f87daa05297b201eeb99c87
Author: Albert Astals Cid <aacid at kde.org>
Date: Mon Feb 7 19:48:28 2011 +0000
Make sure tx is inside the bitmap
Seems to be what the code tried to do, fixes crash in bug 33948 depending on
the resolution you render it
diff --git a/poppler/SplashOutputDev.cc b/poppler/SplashOutputDev.cc
index 394c592..63a471c 100644
--- a/poppler/SplashOutputDev.cc
+++ b/poppler/SplashOutputDev.cc
@@ -15,7 +15,7 @@
//
// Copyright (C) 2005 Takashi Iwai <tiwai at suse.de>
// Copyright (C) 2006 Stefan Schweizer <genstef at gentoo.org>
-// Copyright (C) 2006-2010 Albert Astals Cid <aacid at kde.org>
+// Copyright (C) 2006-2011 Albert Astals Cid <aacid at kde.org>
// Copyright (C) 2006 Krzysztof Kowalczyk <kkowalczyk at gmail.com>
// Copyright (C) 2006 Scott Turner <scotty1024 at mac.com>
// Copyright (C) 2007 Koji Otani <sho at bbr.jp>
@@ -3014,14 +3014,14 @@ void SplashOutputDev::beginTransparencyGroup(GfxState *state, double *bbox,
tx = (int)floor(xMin);
if (tx < 0) {
tx = 0;
- } else if (tx > bitmap->getWidth()) {
- tx = bitmap->getWidth();
+ } else if (tx >= bitmap->getWidth()) {
+ tx = bitmap->getWidth() - 1;
}
ty = (int)floor(yMin);
if (ty < 0) {
ty = 0;
- } else if (ty > bitmap->getHeight()) {
- ty = bitmap->getHeight();
+ } else if (ty >= bitmap->getHeight()) {
+ ty = bitmap->getHeight() - 1;
}
w = (int)ceil(xMax) - tx + 1;
if (tx + w > bitmap->getWidth()) {
More information about the poppler
mailing list