upstream will release this fix in xpdf-3.03). Also apply a patch that kili@ lifted from poppler some time ago. Both patches fix crashes seen with some PDF documents. ok sthen, "don't wait for me" kili
35 lines
1.0 KiB
Plaintext
35 lines
1.0 KiB
Plaintext
$OpenBSD: patch-splash_SplashXPathScanner_cc,v 1.3 2011/03/03 21:22:13 stsp Exp $
|
|
|
|
http://www.mail-archive.com/ports@openbsd.org/msg23488.html
|
|
|
|
--- splash/SplashXPathScanner.cc.orig Mon Aug 16 13:56:18 2010
|
|
+++ splash/SplashXPathScanner.cc Mon Aug 16 13:57:02 2010
|
|
@@ -397,7 +397,7 @@ void SplashXPathScanner::clipAALine(SplashBitmap *aaBu
|
|
for (; xx + 7 <= xx0; xx += 8) {
|
|
*p++ = 0x00;
|
|
}
|
|
- if (xx <= xx0) {
|
|
+ if (xx < xx0) {
|
|
*p &= 0xff >> (xx0 & 7);
|
|
}
|
|
}
|
|
@@ -406,6 +406,9 @@ void SplashXPathScanner::clipAALine(SplashBitmap *aaBu
|
|
}
|
|
}
|
|
xx0 = (*x1 + 1) * splashAASize;
|
|
+ if (xx0 > aaBuf->getWidth()) {
|
|
+ xx0 = aaBuf->getWidth();
|
|
+ }
|
|
// set [xx, xx0) to 0
|
|
if (xx < xx0) {
|
|
p = aaBuf->getDataPtr() + yy * aaBuf->getRowSize() + (xx >> 3);
|
|
@@ -420,7 +423,7 @@ void SplashXPathScanner::clipAALine(SplashBitmap *aaBu
|
|
for (; xx + 7 <= xx0; xx += 8) {
|
|
*p++ = 0x00;
|
|
}
|
|
- if (xx <= xx0) {
|
|
+ if (xx < xx0) {
|
|
*p &= 0xff >> (xx0 & 7);
|
|
}
|
|
}
|