Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

v3.1.x Fix 2758 #2759

Merged
merged 2 commits into from
Jul 7, 2024
Merged

v3.1.x Fix 2758 #2759

merged 2 commits into from
Jul 7, 2024

Conversation

JimBobSquarePants
Copy link
Member

@JimBobSquarePants JimBobSquarePants commented Jun 27, 2024

Prerequisites

  • I have written a descriptive pull-request title
  • I have verified that there are no overlapping pull-requests open
  • I have verified that I am following the existing coding patterns and practice as demonstrated in the repository. These follow strict Stylecop rules 馃懏.
  • I have provided test coverage for my change (where applicable)

Description

Fixes #2758

I cannot include the images in the tests as I was unable to open a FileExplorer instance containing them without crashing in my Windows 11 instance.

Still not sure what's going on with the provided repo, but I have added the relevant test images and tests.

@antonfirsov
Copy link
Member

Looks like it's breaking other gif use-cases?

I plan to also take a look in the weekend and the add test images. For me File Explorer works on Win11 for the folder.

@JimBobSquarePants
Copy link
Member Author

Looks like it's breaking other gif use-cases?

I plan to also take a look in the weekend and the add test images. For me File Explorer works on Win11 for the folder.

@antonfirsov My first attempt was bad as I misunderstood the problem.

I've now refactored the LZW decoder to run row-by-row, so we only allocate enough bytes for a single row rather than the full buffer. In this case this brings down the allocation from 4GB to 64K. This should mean a massive win across the board.

@JimBobSquarePants JimBobSquarePants merged commit b496109 into release/3.1.x Jul 7, 2024
22 checks passed
@JimBobSquarePants JimBobSquarePants deleted the js/fix-2758 branch July 7, 2024 06:09
@JimBobSquarePants JimBobSquarePants mentioned this pull request Jul 7, 2024
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Payloads that caused a DOS attack (GIF / JPEG)
2 participants