Apply upstream commit 37077aa475d2dee81f87daa05297b201eeb99c87.
Fixes a heap overflow and resulting crashes with some PDF documents. This patch was devised during ports lock. Upstream has since released poppler-0.16.3 which includes this fix. ok sthen, "don't wait for me" kili
This commit is contained in:
parent
1bfd6642b1
commit
047d472de7
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.44 2010/12/24 14:02:12 kili Exp $
|
||||
# $OpenBSD: Makefile,v 1.45 2011/03/03 21:25:38 stsp Exp $
|
||||
.include <bsd.own.mk>
|
||||
|
||||
COMMENT-main= PDF rendering library
|
||||
@ -9,7 +9,7 @@ V= 0.14.5
|
||||
DISTNAME= poppler-$V
|
||||
CATEGORIES= print
|
||||
PKGNAME-main= poppler-$V
|
||||
REVISION-main= 0
|
||||
REVISION-main= 1
|
||||
FULLPKGNAME-qt= poppler-qt-$V
|
||||
FULLPKGNAME-qt4=poppler-qt4-$V
|
||||
|
||||
|
26
print/poppler/patches/patch-poppler_SplashOutputDev_cc
Normal file
26
print/poppler/patches/patch-poppler_SplashOutputDev_cc
Normal file
@ -0,0 +1,26 @@
|
||||
$OpenBSD: patch-poppler_SplashOutputDev_cc,v 1.1 2011/03/03 21:25:38 stsp Exp $
|
||||
|
||||
Upstream commit 37077aa475d2dee81f87daa05297b201eeb99c87.
|
||||
Fixes a heap overflow.
|
||||
|
||||
--- poppler/SplashOutputDev.cc.orig Sat Feb 19 15:18:31 2011
|
||||
+++ poppler/SplashOutputDev.cc Sat Feb 19 15:19:20 2011
|
||||
@@ -2881,14 +2881,14 @@ void SplashOutputDev::beginTransparencyGroup(GfxState
|
||||
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()) {
|
Loading…
Reference in New Issue
Block a user