From 5508f74603d7a816ab67456939bd3ee57676f842 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Sat, 9 Nov 2019 11:29:52 -0500 Subject: Allow /P in encryption dictionary to be positive (fixes #382) Even though this is disallowed by the spec, files like this have been encountered in the wild. --- ChangeLog | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index d2013565..3e3d7a4a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2019-11-09 Jay Berkenbilt + + * When reading /P from the encryption dictionary, use static_cast + instead of QIntC to convert the value to a signed integer. The + value of /P is a bit field, and PDF files have been found in the + wild where /P is represented as an unsigned integer even though + the spec states that it is a signed 32-bit value. By using + static_cast, we allow qpdf to compensate for writers that + incorrectly represent the correct bit field as an unsigned value. + Fixes #382. + 2019-11-05 Jay Berkenbilt * Add support for pluggable crypto providers, enabling multiple -- cgit v1.2.3-54-g00ecf