From 6232bed5562da9676cf223cba9ae66fafccc8703 Mon Sep 17 00:00:00 2001 From: arnav-hiwarkar Date: Tue, 17 Nov 2026 22:20:14 +0530 Subject: [PATCH] #3830: stop collecting a .3dl line's numbers past the mesh limit --- crates/effects/src/ocio/lut.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/effects/src/ocio/lut.rs b/crates/effects/src/ocio/lut.rs index fc16da0ea..f3622e990 100644 --- a/crates/effects/src/ocio/lut.rs +++ b/crates/effects/src/ocio/lut.rs @@ -68,7 +68,7 @@ pub fn parse_3dl(text: &str) -> Option { } continue; } - let v: Vec = l.split_whitespace().filter_map(|t| t.parse().ok()).collect(); + let v: Vec = l.split_whitespace().filter_map(|t| t.parse().ok()).take(MAX_LATTICE + 1).collect(); if v.len() > 3 && mesh.is_none() && rows.is_empty() { // The mesh length is the lattice side: refuse one no lattice reader accepts (#3830). if v.len() > MAX_LATTICE {