Skip to content

Commit

Permalink
PDFBOX-5927: prevent dictionary key from becoming an indirect object …
Browse files Browse the repository at this point in the history
…in an object stream

git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1922608 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
THausherr committed Dec 20, 2024
1 parent af63a31 commit b254377
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,10 @@ private void writeCOSDictionary(OutputStream output, COSDictionary cosDictionary
{
if (entry.getValue() != null)
{
writeObject(output, entry.getKey(), false);
// PDFBOX-5927: topLevel true to avoid having a dictionary key as an indirect object
// if it already exists as such
writeObject(output, entry.getKey(), true);

writeObject(output, entry.getValue(), false);
}
}
Expand Down

0 comments on commit b254377

Please sign in to comment.