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
27 lines
850 B
Plaintext
27 lines
850 B
Plaintext
$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()) {
|