Fix denial-of-service attack when reading corrupt PDF files.

This commit is contained in:
Michael R Sweet
2023-02-03 20:39:04 -05:00
parent 57d5894f33
commit 4f10021e7e
9 changed files with 43 additions and 18 deletions

View File

@ -1,7 +1,7 @@
//
// PDF file functions for PDFio.
//
// Copyright © 2021-2022 by Michael R Sweet.
// Copyright © 2021-2023 by Michael R Sweet.
//
// Licensed under Apache License v2.0. See the file "LICENSE" for more
// information.
@ -1984,6 +1984,8 @@ load_xref(
return (false);
}
PDFIO_DEBUG("load_xref: Got trailer dict.\n");
_pdfioTokenFlush(&tb);
if (!pdf->trailer_dict)