blob: 1f32b41abb414b281b16ae456aa6be739f688132 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
From 09a0f982bd1601c7cd2ed28490e4d54a635b0838 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hubert=20Figui=C3=A8re?= <hub@figuiere.net>
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 <hub@figuiere.net>
---
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
|