Skip to content

Tests/LibPDF: Add test for embedded jbig2 cross-chunk ref#26203

Merged
nico merged 2 commits intoSerenityOS:masterfrom
nico:jbig2-pdf-test
Sep 10, 2025
Merged

Tests/LibPDF: Add test for embedded jbig2 cross-chunk ref#26203
nico merged 2 commits intoSerenityOS:masterfrom
nico:jbig2-pdf-test

Conversation

@nico
Copy link
Contributor

@nico nico commented Sep 10, 2025

Test case created by copying
Tests/LibGfx/test-inputs/jbig2/bitmap-symbol.jbig2, changing the byte at
offset 0x31 from 0x01 to 0x00 to make the symbol dictionary segment a
global segment instead of associated with page 1, then ran
Meta/jbig2_to_pdf.py on that modified file to create the new PDF.

The new file contains a JBIG2Globals stream with the symbol dictionary
segment, which the main jbig2 data stream refers to.

This would've caught the regression fixed in #26199.

@github-actions github-actions bot added the 👀 pr-needs-review PR needs review from a maintainer or community member label Sep 10, 2025
Renames jbig2-globals.pdf to jbig2-globals-indirect-reference.pdf.

No behavior change.
Test case created by copying
Tests/LibGfx/test-inputs/jbig2/bitmap-symbol.jbig2, changing the byte at
offset 0x31 from 0x01 to 0x00 to make the symbol dictionary segment a
global segment instead of associated with page 1, then ran
Meta/jbig2_to_pdf.py on that modified file to create the new PDF.

The new file contains a JBIG2Globals stream with the symbol dictionary
segment, which the main jbig2 data stream refers to.

This would've caught the regression fixed in SerenityOS#26199.
@nico nico merged commit c8281f2 into SerenityOS:master Sep 10, 2025
12 checks passed
@github-actions github-actions bot removed the 👀 pr-needs-review PR needs review from a maintainer or community member label Sep 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant