fix: security, correctness, and performance improvements from TODO review#103
Merged
Conversation
Agent-Logs-Url: https://github.com/cross-org/image/sessions/363016e9-df1d-4e62-b1e3-88d93ae1a755 Co-authored-by: Hexagon <419737+Hexagon@users.noreply.github.com>
Agent-Logs-Url: https://github.com/cross-org/image/sessions/363016e9-df1d-4e62-b1e3-88d93ae1a755 Co-authored-by: Hexagon <419737+Hexagon@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
Hexagon
April 9, 2026 18:19
View session
Member
|
@copilot have a look at the ci fsilures |
Agent-Logs-Url: https://github.com/cross-org/image/sessions/917a56d1-bf05-42f8-84cc-96db29a01a88 Co-authored-by: Hexagon <419737+Hexagon@users.noreply.github.com>
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
readUint32LEsigned overflow — already fixed (>>> 0)readUint32signed overflow — already fixed (>>> 0)push(...entry)stack overflow — already fixed (for-of loop)readUint32LEduplicate — already fixed (imports from byte_utils)compressedFrames[]in first pass, reuse.lengthforStripByteCountsactualHeight— useMath.floorbeforevalidateImageDimensionsif (pos + 8 > data.length) breakvalidateImageDimensions— added after dimension calculationextractMetadatausesreadUint32LEfor signed DPI fields — changed toreadInt32LEIDCT_COS[k][n]module-level constant, ~10-100× faster on large imagesmedianFilterallocates 4 arrays per pixel — moved outside loop, resetlength = 0per iterationdeno fmtCHANGELOG.md line-wrap