1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-24 09:08:07 +02:00

Replace the EXIF-block with dummy data to prevent JPEG images being rotated (bug 1942064)

The `ImageDecoder` will respect the EXIF orientation, which can lead to JPEG images being incorrectly rotated. To avoid this we replace the entire EXIF-block with dummy data, which works since it'll cause EXIF parsing to bail out early in Firefox; see https://searchfox.org/mozilla-central/rev/9a66d18cb35595c89f499a1011c9dd7e573fce77/image/decoders/EXIF.cpp#130-138
This commit is contained in:
Jonas Jenwald 2025-01-19 10:49:47 +01:00
parent 01d542eee5
commit c4ba3ac23f
4 changed files with 31 additions and 0 deletions

View file

@ -503,6 +503,7 @@
!annotation-line-without-appearance.pdf
!bug1669099.pdf
!annotation-square-circle.pdf
!bug1942064.pdf
!annotation-square-circle-without-appearance.pdf
!annotation-stamp.pdf
!issue14048.pdf

BIN
test/pdfs/bug1942064.pdf Normal file

Binary file not shown.

View file

@ -8997,6 +8997,13 @@
"link": true,
"type": "other"
},
{
"id": "bug1942064",
"file": "pdfs/bug1942064.pdf",
"md5": "d50b5ebb8cab1211609d16faa54ec47d",
"rounds": 1,
"type": "eq"
},
{
"id": "issue16221-text",
"file": "pdfs/issue16221.pdf",