Commit c582208
committed
JPEG2000 writer: remove NUL terminated byte at end of payload of 'lbl ' and 'xml ' boxes
For label boxes, the spec is pretty explicit about that: "Label strings are not null-terminated"
Cf
https://www.itu.int/rec/dologin_pub.asp?lang=e&id=T-REC-T.801-200208-S!!PDF-E&type=items
"M.11.13 Label box", page 197
For XML boxes, nothing explicit, but in the absence of a statement,
null-terminating byte doesn't seem necessary. Furthermore jpylyzer
documentation at https://jpylyzer.openpreservation.org/doc/latest/userManual.html
has a 'nullxml' option because 'Apparently some old versions of the Kakadu demo
applications would erroneously add a null-byte to embedded XML'.
Fixes https://lists.osgeo.org/pipermail/gdal-dev/2025-November/061180.html
Reported-by: Brad Hards <[email protected]>1 parent 6b5353e commit c582208
File tree
3 files changed
+9
-7
lines changed- autotest/gdrivers/data/jpeg2000
- gcore
3 files changed
+9
-7
lines changedBinary file not shown.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
488 | 488 | | |
489 | 489 | | |
490 | 490 | | |
491 | | - | |
| 491 | + | |
492 | 492 | | |
493 | 493 | | |
494 | 494 | | |
| |||
504 | 504 | | |
505 | 505 | | |
506 | 506 | | |
507 | | - | |
| 507 | + | |
508 | 508 | | |
509 | 509 | | |
510 | 510 | | |
511 | 511 | | |
512 | | - | |
| 512 | + | |
513 | 513 | | |
514 | 514 | | |
515 | 515 | | |
| |||
530 | 530 | | |
531 | 531 | | |
532 | 532 | | |
| 533 | + | |
| 534 | + | |
533 | 535 | | |
534 | 536 | | |
535 | 537 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3333 | 3333 | | |
3334 | 3334 | | |
3335 | 3335 | | |
3336 | | - | |
| 3336 | + | |
3337 | 3337 | | |
3338 | 3338 | | |
3339 | 3339 | | |
| |||
3362 | 3362 | | |
3363 | 3363 | | |
3364 | 3364 | | |
3365 | | - | |
| 3365 | + | |
3366 | 3366 | | |
3367 | 3367 | | |
3368 | 3368 | | |
| |||
3385 | 3385 | | |
3386 | 3386 | | |
3387 | 3387 | | |
3388 | | - | |
| 3388 | + | |
3389 | 3389 | | |
3390 | 3390 | | |
3391 | 3391 | | |
| |||
3403 | 3403 | | |
3404 | 3404 | | |
3405 | 3405 | | |
3406 | | - | |
| 3406 | + | |
3407 | 3407 | | |
3408 | 3408 | | |
3409 | 3409 | | |
| |||
0 commit comments