Package: release.debian.org Severity: normal User: release.debian....@packages.debian.org Usertags: unblock
Please unblock pdftk/1.44-7. It includes a fix for an important bug. Changelog: * Add patch to solve failures with particular PDF 1.5 documents generated e.g. by newer pdflatex versions: Do not fail if an ObjStm ends with a number. (Closes: #687669) The full debdiff and the applied patch are attached. unblock pdftk/1.44-7 Thanks! Regards, Johann Felix Soden
diff -Nru pdftk-1.44/debian/changelog pdftk-1.44/debian/changelog --- pdftk-1.44/debian/changelog 2012-09-03 01:47:55.000000000 +0200 +++ pdftk-1.44/debian/changelog 2013-01-08 00:40:51.000000000 +0100 @@ -1,3 +1,12 @@ +pdftk (1.44-7) unstable; urgency=low + + * Add patch to solve failures with particular PDF 1.5 documents generated + e.g. by newer pdflatex versions: Do not fail if an ObjStm ends with a + number. (Closes: #687669) + Thanks to Robin Houston <robin.hous...@gmail.com>. + + -- Johann Felix Soden <joh...@debian.org> Tue, 08 Jan 2013 00:36:58 +0100 + pdftk (1.44-6) unstable; urgency=medium * Fix burst command. It produced non-standard-conform pdf files whose unused diff -Nru pdftk-1.44/debian/patches/fix_objstm_ends_with_number pdftk-1.44/debian/patches/fix_objstm_ends_with_number --- pdftk-1.44/debian/patches/fix_objstm_ends_with_number 1970-01-01 01:00:00.000000000 +0100 +++ pdftk-1.44/debian/patches/fix_objstm_ends_with_number 2013-01-08 00:35:43.000000000 +0100 @@ -0,0 +1,30 @@ +Description: Do not fail if an ObjStm ends with a number + Without this fix, pdftk fails for example on particular PDF version 1.5 + documents generated by newer pdflatex versions. + + The actual bug is in the method PRTokeniser#nextValidToken. This method has + the feature that it treats an indirect object reference (such as 24 0 R) as a + single token. Therefore when it sees a number, it has to look ahead to see if + the number is actually the start of an indirect object reference. If, however, + the object stream ends during this lookahead then it would wrongly fail. So it + will go wrong whenever the last object in an object stream is a number. +Author: Robin Houston <robin.hous...@gmail.com> +Bug-Debian: http://bugs.debian.org/687669 + +-- + +--- a/java/com/lowagie/text/pdf/PRTokeniser.java ++++ b/java/com/lowagie/text/pdf/PRTokeniser.java +@@ -272,6 +272,12 @@ + } + } + } ++ if (level > 0) { ++ type = TK_NUMBER; ++ file.seek(ptr); ++ stringValue = n1; ++ return; ++ } + throwError("Unexpected end of file"); + } + diff -Nru pdftk-1.44/debian/patches/series pdftk-1.44/debian/patches/series --- pdftk-1.44/debian/patches/series 2012-09-03 01:47:55.000000000 +0200 +++ pdftk-1.44/debian/patches/series 2013-01-08 00:35:16.000000000 +0100 @@ -5,3 +5,4 @@ fix_pdfwriter_nullpointerexception overwrite_more_lc_environ_variables fix_pdfwriter_wrong_xref_entries +fix_objstm_ends_with_number
Description: Do not fail if an ObjStm ends with a number Without this fix, pdftk fails for example on particular PDF version 1.5 documents generated by newer pdflatex versions. The actual bug is in the method PRTokeniser#nextValidToken. This method has the feature that it treats an indirect object reference (such as 24 0 R) as a single token. Therefore when it sees a number, it has to look ahead to see if the number is actually the start of an indirect object reference. If, however, the object stream ends during this lookahead then it would wrongly fail. So it will go wrong whenever the last object in an object stream is a number. Author: Robin Houston <robin.hous...@gmail.com> Bug-Debian: http://bugs.debian.org/687669 -- --- a/java/com/lowagie/text/pdf/PRTokeniser.java +++ b/java/com/lowagie/text/pdf/PRTokeniser.java @@ -272,6 +272,12 @@ } } } + if (level > 0) { + type = TK_NUMBER; + file.seek(ptr); + stringValue = n1; + return; + } throwError("Unexpected end of file"); }
signature.asc
Description: This is a digitally signed message part