KamoCRM

Harden ffmpeg resize (probe safety, dim caps, bomb guard)

FixConversionService
Shipped
9 ஜூலை, 2026 அன்று 7:33 PM UTC
Author
Kamo
Commit
373e5c2

Adversarial-review follow-ups on the ffmpeg rewrite: - probeDimensions redirects ffprobe output to a file and calls waitFor() FIRST (destroyForcibly on timeout). The previous read-before-waitFor made the 15s timeout unreachable, so a stalled ffprobe on crafted input could hang the request thread and exhaust the pool. - Reject images over ~100 MP (from the header, before any full decode) to stop decompression bombs from allocating gigabytes. - Cap BOTH width and height (scale within 3840x1080, force_original_aspect_ratio =decrease, even dims). Capping only height let very-wide panoramas exceed libwebp's 16383px limit and fail the encode.

All changes

Like what you see shipping?

All of it arrives in your workspace on its own. Start on the free plan and read this page again in a month.

Start Free ForeverView Pricing