From 09a0f982bd1601c7cd2ed28490e4d54a635b0838 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hubert=20Figui=C3=A8re?= Date: Sat, 1 Jun 2024 19:43:11 -0400 Subject: [PATCH 4/4] Fix a crash on an OOB container access MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Hubert Figuière --- src/Controller/Src/Finder/Finder.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Controller/Src/Finder/Finder.cpp b/src/Controller/Src/Finder/Finder.cpp index aa6b853..5e063e8 100755 --- a/src/Controller/Src/Finder/Finder.cpp +++ b/src/Controller/Src/Finder/Finder.cpp @@ -52,6 +52,9 @@ namespace epsonscan { } SDIDeviceInfo* Finder::GetDevicesPointer() { + if (devices_.size() == 0) { + return nullptr; + } return &devices_[0]; } int32_t Finder::GetDevicesCount() const -- 2.45.0