From 342cadfc008230554bc1556078a82625072b27db Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Sat, 16 Nov 2024 21:20:54 -0500 Subject: [PATCH] =?UTF-8?q?Check=20for=20or=20handle=20argument=20length?= =?UTF-8?q?=20>2=E2=8B=8631=20in=20/=E2=81=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/builtins/slash.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/builtins/slash.c b/src/builtins/slash.c index 2a0fe97d..ec515e75 100644 --- a/src/builtins/slash.c +++ b/src/builtins/slash.c @@ -951,10 +951,10 @@ B slash_im(B t, B x) { case el_i32: { i32* xp = i32any_ptr(x); TRY_SMALL_OUT(32) + if (xia>I32_MAX) thrM("/⁼: Argument too large"); INIT_RES(32,ria) simd_count_i32_i32(rp, xp, xia); - r = num_squeeze(r); - break; + r = num_squeeze(r); break; } #undef TRY_SMALL_OUT #undef INIT_RES @@ -968,10 +968,12 @@ B slash_im(B t, B x) { TALLOC(usz, t, ria); \ for (usz j=0; jI32_MAX) thrM("/⁼: Argument too large"); i32* rp; r = m_i32arrv(&rp, ria); for (usz i=0; i