Fix possible out of bounds access in xpath code, reported upstream; bump
package name. ok kili@
This commit is contained in:
parent
ab0ae67c47
commit
341c29a6c7
@ -1,10 +1,10 @@
|
|||||||
# $OpenBSD: Makefile,v 1.64 2009/04/17 20:55:46 kili Exp $
|
# $OpenBSD: Makefile,v 1.65 2009/05/30 22:35:56 miod Exp $
|
||||||
|
|
||||||
COMMENT-main= PDF viewer for X11
|
COMMENT-main= PDF viewer for X11
|
||||||
COMMENT-utils= PDF conversion tools
|
COMMENT-utils= PDF conversion tools
|
||||||
|
|
||||||
DISTNAME= xpdf-3.02
|
DISTNAME= xpdf-3.02
|
||||||
PKGNAME-main= xpdf-3.02.3
|
PKGNAME-main= xpdf-3.02.3p0
|
||||||
PKGNAME-utils= xpdf-utils-3.02.3
|
PKGNAME-utils= xpdf-utils-3.02.3
|
||||||
CATEGORIES= textproc x11
|
CATEGORIES= textproc x11
|
||||||
|
|
||||||
|
23
textproc/xpdf/patches/patch-splash_SplashXPath_cc
Normal file
23
textproc/xpdf/patches/patch-splash_SplashXPath_cc
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
$OpenBSD: patch-splash_SplashXPath_cc,v 1.1 2009/05/30 22:35:57 miod Exp $
|
||||||
|
--- splash/SplashXPath.cc.orig Tue Feb 27 22:05:52 2007
|
||||||
|
+++ splash/SplashXPath.cc Sat May 30 19:51:56 2009
|
||||||
|
@@ -77,9 +77,17 @@ SplashXPath::SplashXPath(SplashPath *path, SplashCoord
|
||||||
|
for (i = 0; i < path->hintsLength; ++i) {
|
||||||
|
hint = &path->hints[i];
|
||||||
|
x0 = pts[hint->ctrl0 ].x; y0 = pts[hint->ctrl0 ].y;
|
||||||
|
- x1 = pts[hint->ctrl0 + 1].x; y1 = pts[hint->ctrl0 + 1].y;
|
||||||
|
+ if (hint->ctrl0 + 1 >= path->length) {
|
||||||
|
+ x1 = x0; y1 = y0;
|
||||||
|
+ } else {
|
||||||
|
+ x1 = pts[hint->ctrl0 + 1].x; y1 = pts[hint->ctrl0 + 1].y;
|
||||||
|
+ }
|
||||||
|
x2 = pts[hint->ctrl1 ].x; y2 = pts[hint->ctrl1 ].y;
|
||||||
|
- x3 = pts[hint->ctrl1 + 1].x; y3 = pts[hint->ctrl1 + 1].y;
|
||||||
|
+ if (hint->ctrl1 + 1 >= path->length) {
|
||||||
|
+ x3 = x2; y3 = y2;
|
||||||
|
+ } else {
|
||||||
|
+ x3 = pts[hint->ctrl1 + 1].x; y3 = pts[hint->ctrl1 + 1].y;
|
||||||
|
+ }
|
||||||
|
if (x0 == x1 && x2 == x3) {
|
||||||
|
adjusts[i].vert = gTrue;
|
||||||
|
adj0 = x0;
|
Loading…
Reference in New Issue
Block a user