Commit 89568d6
committed
fix(iff): Handle non-zero origin, protect against buffer overflows (#4925)
IffInput::read_native_tile was simply incorrect for images with nonzero
data window origin. Fix!
Also switch the forumulation to use spancpy rather than memcpy, to be a
little more careful that we are't overwriting the presumed sizes of the
buffers.
And while I'm in there, I realized we can hold the mutex for less time.
---------
Signed-off-by: Larry Gritz <[email protected]>1 parent 677d4b0 commit 89568d6
1 file changed
+25
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
505 | 505 | | |
506 | 506 | | |
507 | 507 | | |
508 | | - | |
509 | 508 | | |
510 | 509 | | |
511 | 510 | | |
512 | | - | |
513 | | - | |
514 | | - | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
515 | 517 | | |
516 | 518 | | |
517 | 519 | | |
518 | | - | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
519 | 531 | | |
520 | 532 | | |
521 | 533 | | |
| |||
525 | 537 | | |
526 | 538 | | |
527 | 539 | | |
528 | | - | |
529 | | - | |
530 | | - | |
531 | | - | |
532 | | - | |
533 | | - | |
534 | | - | |
535 | | - | |
536 | | - | |
537 | | - | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
538 | 548 | | |
539 | 549 | | |
540 | 550 | | |
| |||
0 commit comments