From 1f71ba085433c5c03eb24bc7bb99ae71de4ac9d7 Mon Sep 17 00:00:00 2001 From: mbalmer Date: Sat, 22 Jan 2005 17:12:43 +0000 Subject: [PATCH] SECURITY: Apply a security fix from xpdf, which is the base for pdftops and bump the package name. spotted by alek@ --- print/cups/Makefile | 4 ++-- print/cups/patches/patch-pdftops_XRef_cxx | 14 ++++++++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/print/cups/Makefile b/print/cups/Makefile index b3393a5cc88..66e390ff9b5 100644 --- a/print/cups/Makefile +++ b/print/cups/Makefile @@ -1,10 +1,10 @@ -# $OpenBSD: Makefile,v 1.1.1.1 2005/01/16 12:36:42 mbalmer Exp $ +# $OpenBSD: Makefile,v 1.2 2005/01/22 17:12:43 mbalmer Exp $ COMMENT= "Common Unix Printing System" VERSION= 1.1.23 DISTNAME= cups-${VERSION}-source -PKGNAME= ${DISTNAME:S/-source//} +PKGNAME= ${DISTNAME:S/-source//}p0 CATEGORIES= print sysutils HOMEPAGE= http://www.cups.org/ diff --git a/print/cups/patches/patch-pdftops_XRef_cxx b/print/cups/patches/patch-pdftops_XRef_cxx index ae3a590c978..2ff0ae30192 100644 --- a/print/cups/patches/patch-pdftops_XRef_cxx +++ b/print/cups/patches/patch-pdftops_XRef_cxx @@ -1,6 +1,6 @@ -$OpenBSD: patch-pdftops_XRef_cxx,v 1.1.1.1 2005/01/16 12:36:51 mbalmer Exp $ +$OpenBSD: patch-pdftops_XRef_cxx,v 1.2 2005/01/22 17:12:43 mbalmer Exp $ --- pdftops/XRef.cxx.orig Wed Oct 13 22:55:53 2004 -+++ pdftops/XRef.cxx Sat Dec 25 12:03:27 2004 ++++ pdftops/XRef.cxx Sat Jan 22 17:42:31 2005 @@ -16,6 +16,7 @@ #include #include @@ -45,3 +45,13 @@ $OpenBSD: patch-pdftops_XRef_cxx,v 1.1.1.1 2005/01/16 12:36:51 mbalmer Exp $ error(-1, "Invalid 'endstream' parameter."); return gFalse; } +@@ -526,6 +527,9 @@ GBool XRef::checkEncrypted(GString *owne + keyLength = lengthObj.getInt() / 8; + } else { + keyLength = 5; ++ } ++ if (keyLength > 16) { ++ keyLength = 16; + } + permFlags = permissions.getInt(); + if (encVersion >= 1 && encVersion <= 2 &&