From 57068e71084be6919e0be87baead0d5c38aea294 Mon Sep 17 00:00:00 2001 From: namse Date: Sun, 15 Sep 2024 15:06:11 +0000 Subject: [PATCH] Protect bound --- namui/namui/src/system/audio/opus.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/namui/namui/src/system/audio/opus.rs b/namui/namui/src/system/audio/opus.rs index ef7a79d08..391a4ee85 100644 --- a/namui/namui/src/system/audio/opus.rs +++ b/namui/namui/src/system/audio/opus.rs @@ -183,7 +183,8 @@ where absgp as u64, )?; - interleaved_samples = &interleaved_samples[frame_size..]; + interleaved_samples = + &interleaved_samples[(frame_size.min(interleaved_samples.len()))..]; } }