fix(analysis): cap decoded pixels on the vision backend too
The vision prep pass decoded pages with bare `image::load_from_memory`, which applies no allocation bound. `max_pixels` only downscales after a full decode, so a tiny WebP/JPEG header declaring huge dimensions could OOM the blocking worker — the same decompression-bomb the OCR backend already guards against. Manga pages are commonly WebP/JPEG, where the format's own self-limits are weaker than PNG's. Route the decode through `decode_within`, applying an `image::Limits` alloc cap sized from the shared `ocr_max_decode_pixels` (ANALYSIS_OCR_MAX_DECODE_PIXELS). Add real-WebP bomb coverage asserting both the helper and the end-to-end Undecodable fallback. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2
backend/Cargo.lock
generated
2
backend/Cargo.lock
generated
@@ -1558,7 +1558,7 @@ checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4"
|
||||
|
||||
[[package]]
|
||||
name = "mangalord"
|
||||
version = "0.93.6"
|
||||
version = "0.93.7"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"argon2",
|
||||
|
||||
Reference in New Issue
Block a user