From e4470a992946f30f6377873370c244eaecdcca52 Mon Sep 17 00:00:00 2001 From: Nik Chizhov Date: Sat, 6 Jul 2024 23:42:31 +0900 Subject: [PATCH] fix: out-of-border access --- src/util/cd_image_m3u.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/cd_image_m3u.cpp b/src/util/cd_image_m3u.cpp index 326bfbcc5..97bd4510d 100644 --- a/src/util/cd_image_m3u.cpp +++ b/src/util/cd_image_m3u.cpp @@ -161,7 +161,7 @@ bool CDImageM3u::SwitchSubImage(u32 index, Error* error) std::string CDImageM3u::GetSubImageMetadata(u32 index, std::string_view type) const { - if (index > m_entries.size()) + if (index >= m_entries.size()) return {}; if (type == "title")