From a2f8b2dfea932d9db4449ffca3c29da7e231170d Mon Sep 17 00:00:00 2001 From: PThorpe92 Date: Sat, 24 May 2025 14:46:34 -0400 Subject: [PATCH] Fix add check for invalid argv index for vtab constraints in main loop --- core/translate/main_loop.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/translate/main_loop.rs b/core/translate/main_loop.rs index e9371b090..8206cdef5 100644 --- a/core/translate/main_loop.rs +++ b/core/translate/main_loop.rs @@ -391,6 +391,10 @@ pub fn open_loop( // translate the opposite side of the referenced vtab column let expr = if is_rhs { lhs } else { rhs }; // argv_index is 1-based; adjust to get the proper register offset. + if argv_index == 0 { + // invalid since argv_index is 1-based + continue; + } let target_reg = start_reg + (argv_index - 1) as usize; translate_expr(