fix(analysis): cap OCR decoded pixels to stop decompression-bomb OOM

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
MechaCat02
2026-07-01 07:12:40 +02:00
parent 83c2899373
commit 66ae4b221b
8 changed files with 99 additions and 10 deletions

View File

@@ -473,6 +473,8 @@ impl AnalysisSettings {
backend: base.backend,
ocr_detection_model: base.ocr_detection_model.clone(),
ocr_recognition_model: base.ocr_recognition_model.clone(),
// Env-only decompression-bomb decode cap, carried from the base.
ocr_max_decode_pixels: base.ocr_max_decode_pixels,
})
}
}