From 6bb06529b7534e7d12179e99e58b3f63a79bfc5b 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/5] 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 9f993a1..e306b8c 100644 --- a/src/Controller/Src/Finder/Finder.cpp +++ b/src/Controller/Src/Finder/Finder.cpp @@ -41,6 +41,9 @@ namespace epsonscan { } SDIDeviceInfo* Finder::GetDevicesPointer() { + if (devices_.size() == 0) { + return nullptr; + } return &devices_[0]; } -- 2.51.0