diff options
Diffstat (limited to 'media-gfx/epsonscan2/files/0004-Fix-a-crash-on-an-OOB-container-access.patch')
-rw-r--r-- | media-gfx/epsonscan2/files/0004-Fix-a-crash-on-an-OOB-container-access.patch | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/media-gfx/epsonscan2/files/0004-Fix-a-crash-on-an-OOB-container-access.patch b/media-gfx/epsonscan2/files/0004-Fix-a-crash-on-an-OOB-container-access.patch new file mode 100644 index 0000000..1f32b41 --- /dev/null +++ b/media-gfx/epsonscan2/files/0004-Fix-a-crash-on-an-OOB-container-access.patch @@ -0,0 +1,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 + |