Skip to content

fix: security, correctness, and performance improvements from TODO review#103

Merged
Hexagon merged 3 commits into
mainfrom
copilot/work-on-critical-todo-entries
Apr 9, 2026
Merged

fix: security, correctness, and performance improvements from TODO review#103
Hexagon merged 3 commits into
mainfrom
copilot/work-on-critical-todo-entries

Conversation

Copilot AI commented Apr 9, 2026

Copy link
Copy Markdown
Contributor
  • C1: readUint32LE signed overflow — already fixed (>>> 0)
  • C2: PNG readUint32 signed overflow — already fixed (>>> 0)
  • C3: LZW push(...entry) stack overflow — already fixed (for-of loop)
  • H4: WebP local readUint32LE duplicate — already fixed (imports from byte_utils)
  • H1: TIFF double-compression — cache compressedFrames[] in first pass, reuse .length for StripByteCounts
  • H2: ICO non-integer actualHeight — use Math.floor before validateImageDimensions
  • H3: PNG decode loop missing bounds check — add if (pos + 8 > data.length) break
  • M1: PCX missing validateImageDimensions — added after dimension calculation
  • M2: BMP extractMetadata uses readUint32LE for signed DPI fields — changed to readInt32LE
  • M3: JPEG IDCT precompute cosine table — IDCT_COS[k][n] module-level constant, ~10-100× faster on large images
  • M4: medianFilter allocates 4 arrays per pixel — moved outside loop, reset length = 0 per iteration
  • M7: Misleading comment on hue-rotation normalization — updated to "0–360 range"
  • CI fix: deno fmt CHANGELOG.md line-wrap

@Hexagon

Hexagon commented Apr 9, 2026

Copy link
Copy Markdown
Member

@copilot have a look at the ci fsilures

Copilot AI commented Apr 9, 2026

Copy link
Copy Markdown
Contributor Author

@copilot have a look at the ci fsilures

Fixed in 1ad7b76deno fmt --check was failing because a CHANGELOG.md line wrapped at the wrong column. Applied deno fmt to correct the wrapping.

Copilot AI requested a review from Hexagon April 9, 2026 21:49
@Hexagon Hexagon merged commit c4813f3 into main Apr 9, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants