From d86049fc1ed9ee109fdccc24d1ef38023ce18700 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 15 Jan 2024 02:15:02 +0000 Subject: avoid generating a corrupt pdf with certain pdf inclusions, pdftex r916 git-svn-id: svn://tug.org/texlive/trunk@69423 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/web2c/pdftexdir/ChangeLog | 9 ++++++++- Build/source/texk/web2c/pdftexdir/NEWS | 6 ++++++ Build/source/texk/web2c/pdftexdir/pdftoepdf.cc | 8 ++++---- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/Build/source/texk/web2c/pdftexdir/ChangeLog b/Build/source/texk/web2c/pdftexdir/ChangeLog index 87762fb9eb1..67c9ce89f8b 100644 --- a/Build/source/texk/web2c/pdftexdir/ChangeLog +++ b/Build/source/texk/web2c/pdftexdir/ChangeLog @@ -1,3 +1,10 @@ +2024-01-14 Thanh Han The + + * pdftoepdf.cc (write_epdf): call writeRefs at the end, to write + all indirect objects after writing everything else. + From pdftex r916 (and test in r915). Original report: + https://bugs.ghostscript.com/show_bug.cgi?id=706940 + 2023-12-24 TANAKA Takuji * wcfname.test: @@ -29,7 +36,7 @@ 2023-08-28 Karl Berry * tounicode.c (undump_to_unicode): check that gu->name - (and gu->unicode_seq) did not undumped as NULL. + (and gu->unicode_seq) did not get undumped as NULL. Report from Gregory DUCK, https://tug.org/pipermail/tex-live/2023-August/049406.html. diff --git a/Build/source/texk/web2c/pdftexdir/NEWS b/Build/source/texk/web2c/pdftexdir/NEWS index 267d2b283b0..3e52b96db8d 100644 --- a/Build/source/texk/web2c/pdftexdir/NEWS +++ b/Build/source/texk/web2c/pdftexdir/NEWS @@ -1,3 +1,9 @@ +(TeX Live 2024) +- bugfixes: + - more reliable text extraction on BigEndian systems. + - more checks against corrupt pfb, fmt, pdf, files. + - avoid writing a corrupt pdf with unusual pdf inclusions. + pdfTeX 3.141592653-2.6-1.40.25 (TeX Live 2023) (March 9, 2023) - changes: - new keyword `shipout' for \special and \pdfliteral, delaying diff --git a/Build/source/texk/web2c/pdftexdir/pdftoepdf.cc b/Build/source/texk/web2c/pdftexdir/pdftoepdf.cc index e0ce148834f..0dd1c62381e 100644 --- a/Build/source/texk/web2c/pdftexdir/pdftoepdf.cc +++ b/Build/source/texk/web2c/pdftexdir/pdftoepdf.cc @@ -1,5 +1,5 @@ /* -Copyright 1996-2016 Han The Thanh, +Copyright 1996-2024 Han The Thanh, This file is part of pdfTeX. @@ -1026,9 +1026,6 @@ void write_epdf(void) pdfendstream(); } - // write out all indirect objects - writeRefs(); - // write out all used encodings (and delete list) writeEncodings(); @@ -1042,6 +1039,9 @@ void write_epdf(void) // Group included in the Page dict } + // write out all indirect objects + writeRefs(); + // save object list, xref pdf_doc->inObjList = inObjList; pdf_doc->xref = xref; -- cgit v1.2.3