diff options
author | wiz <wiz@pkgsrc.org> | 2013-10-23 09:07:27 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2013-10-23 09:07:27 +0000 |
commit | e73aaf67ec14589cfd42896b61002d978fd53a96 (patch) | |
tree | b444020841a4163825736e88229dcc411807b928 /print | |
parent | ca7499f206388076198430f6fbb04cb35eebf9f8 (diff) | |
download | pkgsrc-e73aaf67ec14589cfd42896b61002d978fd53a96.tar.gz |
Update to 5.0.1:
2013-10-18 Jay Berkenbilt <ejb@ql.org>
* 5.0.1: release
* Warn when -accessibility=n is specified with a modern encryption
format (R > 3). Also, accept this flag (and ignore with warning)
with 256-bit encryption. qpdf has always ignored the
accessibility setting with R > 3, but it previously did so
silently.
2013-10-05 Jay Berkenbilt <ejb@ql.org>
* Replace operator[] in std::string and std::vector with "at" in
order to get bounds checking. This reduces the chances that
incorrect code will result in data exposure or buffer overruns.
See README.hardening for additional notes.
* Use cryptographically secure random number generation when
available. See additional notes in README.
* Replace some assert() calls with std::logic_error exceptions.
Ideally there shouldn't be assert() calls outside of testing.
This change may make a few more potential code errors in handling
invalid data recoverable.
* Security fix: In places where std::vector<T>(size_t) was used,
either validate that the size parameter is sane or refactor code
to avoid the need to pre-allocate the vector. This reduces the
likelihood of allocating a lot of memory in response to invalid
data in linearization hint streams.
* Security fix: sanitize /W array in cross reference stream to
avoid a potential integer overflow in a multiplication. It is
unlikely that any exploits were possible from this bug as
additional checks were also performed.
* Security fix: avoid buffer overrun that could be caused by bogus
data in linearization hint streams. The incorrect code could only
be triggered when checking linearization data, which must be
invoked explicitly. qpdf does not check linearization data when
reading or writing linearized files, but the qpdf --check command
does check linearization data.
* Security fix: properly handle empty strings in
QPDF_Name::normalizeName. The empty string is not a valid name
and would never be parsed as a name, so there were no known
conditions where this method could be called with an empty string.
* Security fix: perform additional argument sanity checks when
reading bit streams.
* Security fix: in QUtil::toUTF8, change bounds checking to avoid
having a pointer point temporarily outside the bounds of an
array. Some compiler optimizations could have made the original
code unsafe.
2013-07-10 Jay Berkenbilt <ejb@ql.org>
* 5.0.0: release
* 4.2.0 turned out to be binary incompatible on some platforms
even though there were no changes to the public API. Therefore
the 4.2.0 release has been withdrawn, and is being replaced with a
5.0.0 release that acknowledges the ABI change and also removes
some problematic methods from the public API.
* Remove methods from public API that were only intended to be
used by QPDFWriter and really didn't make sense to call from
anywhere else as they required internal knowledge that only
QPDFWriter had:
- QPDF::getLinearizedParts
- QPDF::generateHintStream
- QPDF::getObjectStreamData
- QPDF::getCompressibleObjGens
- QPDF::getCompressibleObjects
2013-07-07 Jay Berkenbilt <ejb@ql.org>
* 4.2.0: release [withdrawn]
* Ignore error case of a stream's decode parameters having invalid
length when there are no stream filters.
* qpdf: add --show-npages command-line option, which causes the
number of pages in the input file to be printed on a line by
itself.
* qpdf: allow omission of range in --pages. If range is omitted
such that an argument that is supposed to be a range is an invalid
range and a valid file name, the range of 1-z is assumed. This
makes it possible to merge a bunch of files with something like
qpdf --empty out.pdf --pages *.pdf --
2013-06-15 Jay Berkenbilt <ejb@ql.org>
* Handle some additional broken files with missing /ID in trailer
for encrypted files and with space rather than newline after xref.
2013-06-14 Jay Berkenbilt <ejb@ql.org>
* Detect and correct /Outlines dictionary being a direct object
when linearizing files. This is not allowed by the spec but has
been seen in the wild. Prior to this change, such a file would
cause an internal error in the linearization code, which assumed
/Outlines was indirect.
* Add /Length key to crypt filter dictionary for encrypted files.
This key is optional, but some version of MacOS reportedly fail to
open encrypted PDF files without this key.
* Bug fix: properly handle object stream generation when the
original file has some compressible objects with generation != 0.
* Add QPDF::getCompressibleObjGens() and deprecate
QPDF::getCompressibleObjects(), which had a flaw in its logic.
* Add new QPDFObjectHandle::getObjGen() method and indiciate in
comments that its use is favored over getObjectID() and
getGeneration() for most cases.
* Add new QPDFObjGen object to represent an object ID/generation
pair.
2013-04-14 Jay Berkenbilt <ejb@ql.org>
* 4.1.0: release
2013-03-25 Jay Berkenbilt <ejb@ql.org>
* manual/qpdf-manual.xml: Document the casting policy that is
followed in qpdf's implementation.
2013-03-11 Jay Berkenbilt <ejb@ql.org>
* When creating Windows binary distributions, make sure to only
copy DLLs of the correct type. The ensures that the 32-bit
distributions contain 32-bit DLLs and the 64-bit distributions
contain 64-bit DLLs.
2013-03-07 Jay Berkenbilt <ejb@ql.org>
* Use ./install-sh (already present) instead of "install -c" to
install executables to fix portability problems against different
UNIX variants.
2013-03-03 Jay Berkenbilt <ejb@ql.org>
* Add protected terminateParsing method to
QPDFObjectHandle::ParserCallbacks that implementor can call to
terminate parsing of a content stream.
2013-02-28 Jay Berkenbilt <ejb@ql.org>
* Favor fopen_s and strerror_s on MSVC to avoid CRT security
warnings. This is useful for people who may want to use qpdf in
an application that is Windows 8 certified.
* New method QUtil::safe_fopen to wrap calls to fopen. This is
less cumbersome than calling QUtil::fopen_wrapper.
* Remove all calls to sprintf
* New method QUtil::int_to_string_base to convert to octal or
hexademical (or decimal) strings without using sprintf
2013-02-26 Jay Berkenbilt <ejb@ql.org>
* Rewrite QUtil::int_to_string and QUtil::double_to_string to
remove internal length limits but to remain backward compatible
with the old versions for valid inputs.
2013-02-23 Jay Berkenbilt <ejb@ql.org>
* Bug fix: properly handle overridden compressed objects. When
caching objects from an object stream, only cache objects that,
based on the xref table, would actually be resolved into this
stream. Prior to this fix, if an object stream A contained an
object B that was overridden by an appended section of the file,
qpdf would cache the old value of B if any non-overridden member
of A was accessed before B. This commit fixes that bug.
2013-01-31 Jay Berkenbilt <ejb@ql.org>
* Do not remove libtool's .la file during the make install step.
Note to packagers: if your distribution wants to you remove the
.la file, you will have to do that yourself now.
2013-01-25 Jay Berkenbilt <ejb@ql.org>
* New method QUtil::hex_encode to encode binary data as a
hexadecimal string
* qpdf --check was exiting with status 0 in some rare cases even
when errors were found. It now always exits with one of the
document error codes (0 for success, 2 for errors, 3 or warnings).
2013-01-24 Jay Berkenbilt <ejb@ql.org>
* Make --enable-werror work for MSVC, and generally handle warning
options better for that compiler. Warning flags for that compiler
were previous hard-coded into the build with /WX enabled
unconditionally.
* Split warning flags into WFLAGS in autoconf.mk to make them
easier to override. Before they were repeated in CFLAGS and
CXXFLAGS and were commingled with other compiler flags.
* qpdf --check now does syntactic checks all pages' content
streams as well as checking overall document structure. Semantic
errors are still not checked, and there are no plans to add
semantic checks.
2013-01-22 Jay Berkenbilt <ejb@ql.org>
* Add QPDFObjectHandle::getTypeCode(). This method returns a
unique integer (enumerated type) value corresponding to the object
type of the QPDFObjectHandle. It can be used as an alternative to
the QPDFObjectHandle::is* methods for type testing, particularly
where there is a desire to use a switch statement or optimize for
performance when testing object types.
* Add QPDFObjectHandle::getTypeName(). This method returns a
string literal describing the object type. It is useful for
testing and debugging.
2013-01-20 Jay Berkenbilt <ejb@ql.org>
* Add QPDFObjectHandle::parseContentStream, which parses the
objects in a content stream and calls handlers in a callback
class. The example pdf-parse-content illustrates it use.
* Add QPDF_Operator and QPDF_InlineImage types along with
appropriate wrapper methods in QPDFObjectHandle. These new object
types are to facilitate content stream parsing.
Diffstat (limited to 'print')
-rw-r--r-- | print/qpdf/Makefile | 6 | ||||
-rw-r--r-- | print/qpdf/PLIST | 3 | ||||
-rw-r--r-- | print/qpdf/distinfo | 12 | ||||
-rw-r--r-- | print/qpdf/patches/patch-include_qpdf_QPDFExc.hh | 12 | ||||
-rw-r--r-- | print/qpdf/patches/patch-libqpdf_QPDF.cc | 13 | ||||
-rw-r--r-- | print/qpdf/patches/patch-make_libtool.mk | 12 |
6 files changed, 11 insertions, 47 deletions
diff --git a/print/qpdf/Makefile b/print/qpdf/Makefile index d76f63f7108..62312d96378 100644 --- a/print/qpdf/Makefile +++ b/print/qpdf/Makefile @@ -1,8 +1,6 @@ -# $NetBSD: Makefile,v 1.3 2013/05/31 12:41:49 wiz Exp $ -# +# $NetBSD: Makefile,v 1.4 2013/10/23 09:07:27 wiz Exp $ -DISTNAME= qpdf-4.0.1 -PKGREVISION= 1 +DISTNAME= qpdf-5.0.1 CATEGORIES= print MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=qpdf/} diff --git a/print/qpdf/PLIST b/print/qpdf/PLIST index 02e47aa5cd7..870867d9e3f 100644 --- a/print/qpdf/PLIST +++ b/print/qpdf/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.1 2013/01/31 21:45:23 wiz Exp $ +@comment $NetBSD: PLIST,v 1.2 2013/10/23 09:07:27 wiz Exp $ bin/fix-qdf bin/qpdf bin/zlib-flate @@ -18,6 +18,7 @@ include/qpdf/Pl_StdioFile.hh include/qpdf/PointerHolder.hh include/qpdf/QPDF.hh include/qpdf/QPDFExc.hh +include/qpdf/QPDFObjGen.hh include/qpdf/QPDFObject.hh include/qpdf/QPDFObjectHandle.hh include/qpdf/QPDFTokenizer.hh diff --git a/print/qpdf/distinfo b/print/qpdf/distinfo index a3680673260..c476157a1da 100644 --- a/print/qpdf/distinfo +++ b/print/qpdf/distinfo @@ -1,8 +1,6 @@ -$NetBSD: distinfo,v 1.4 2013/05/09 14:01:43 joerg Exp $ +$NetBSD: distinfo,v 1.5 2013/10/23 09:07:27 wiz Exp $ -SHA1 (qpdf-4.0.1.tar.gz) = 029ad13e1089396df34aeee3c5e386789715112a -RMD160 (qpdf-4.0.1.tar.gz) = e687b293ef45ee3e60600c2ae8c660f013a10c91 -Size (qpdf-4.0.1.tar.gz) = 5031080 bytes -SHA1 (patch-include_qpdf_QPDFExc.hh) = 4a262d7de750c39dfd66cc33314b24b057e206e0 -SHA1 (patch-libqpdf_QPDF.cc) = 06837ddacad4a2d9cb8bb28af8c81e557d9a9a6e -SHA1 (patch-make_libtool.mk) = 24953c7f2db264eff7e543fae990732a9338d5d8 +SHA1 (qpdf-5.0.1.tar.gz) = 41a4bd91bfbc2d3585ea229b53bfd1183186b1b3 +RMD160 (qpdf-5.0.1.tar.gz) = 4a33fdadd9ebf48eb1b1b1292864ed72ba755c07 +Size (qpdf-5.0.1.tar.gz) = 7569985 bytes +SHA1 (patch-make_libtool.mk) = 8622d6a446da284269102dde38bf14271363dfdc diff --git a/print/qpdf/patches/patch-include_qpdf_QPDFExc.hh b/print/qpdf/patches/patch-include_qpdf_QPDFExc.hh deleted file mode 100644 index fd3ede87599..00000000000 --- a/print/qpdf/patches/patch-include_qpdf_QPDFExc.hh +++ /dev/null @@ -1,12 +0,0 @@ -$NetBSD: patch-include_qpdf_QPDFExc.hh,v 1.1 2013/05/09 14:01:44 joerg Exp $ - ---- include/qpdf/QPDFExc.hh.orig 2013-05-09 11:09:27.000000000 +0000 -+++ include/qpdf/QPDFExc.hh -@@ -13,6 +13,7 @@ - - #include <qpdf/Constants.h> - #include <stdexcept> -+#include <string> - - class QPDFExc: public std::runtime_error - { diff --git a/print/qpdf/patches/patch-libqpdf_QPDF.cc b/print/qpdf/patches/patch-libqpdf_QPDF.cc deleted file mode 100644 index 97614f4ed9a..00000000000 --- a/print/qpdf/patches/patch-libqpdf_QPDF.cc +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-libqpdf_QPDF.cc,v 1.1 2013/03/02 17:58:35 joerg Exp $ - ---- libqpdf/QPDF.cc.orig 2013-03-01 23:02:42.000000000 +0000 -+++ libqpdf/QPDF.cc -@@ -40,7 +40,7 @@ static char const* EMPTY_PDF = - "%%EOF\n"; - - --QPDF::ObjGen::ObjGen(int o = 0, int g = 0) : -+QPDF::ObjGen::ObjGen(int o, int g) : - obj(o), - gen(g) - { diff --git a/print/qpdf/patches/patch-make_libtool.mk b/print/qpdf/patches/patch-make_libtool.mk index 03d2748f763..bd51b4f1961 100644 --- a/print/qpdf/patches/patch-make_libtool.mk +++ b/print/qpdf/patches/patch-make_libtool.mk @@ -1,6 +1,6 @@ -$NetBSD: patch-make_libtool.mk,v 1.2 2013/02/12 12:35:36 drochner Exp $ +$NetBSD: patch-make_libtool.mk,v 1.3 2013/10/23 09:07:27 wiz Exp $ -Sent upstream, will be fixed in 4.1.0. +libtool does not need bash. --- make/libtool.mk.orig 2013-01-17 14:51:04.000000000 +0000 +++ make/libtool.mk @@ -13,11 +13,3 @@ Sent upstream, will be fixed in 4.1.0. OBJ=o LOBJ=lo -@@ -116,7 +116,6 @@ install: all - libqpdf/$(OUTPUT_DIR)/libqpdf.la \ - $(DESTDIR)$(libdir)/libqpdf.la - $(LIBTOOL) --finish $(DESTDIR)$(libdir) -- $(RM) $(DESTDIR)$(libdir)/libqpdf.la - $(LIBTOOL) --mode=install install -c \ - qpdf/$(OUTPUT_DIR)/qpdf \ - $(DESTDIR)$(bindir)/qpdf |