diff options
Diffstat (limited to 'epsonscan2-oob-container.patch')
-rw-r--r-- | epsonscan2-oob-container.patch | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/epsonscan2-oob-container.patch b/epsonscan2-oob-container.patch new file mode 100644 index 000000000000..f805363ea4d5 --- /dev/null +++ b/epsonscan2-oob-container.patch @@ -0,0 +1,20 @@ +commit 7e42ca6214a7f3b177b250a8e93b1230f1190f42 +Author: Hubert Figuière <hub@figuiere.net> +Date: Fri Oct 28 11:38:24 2022 -0400 + + Fix out of bound access on empty container + +diff --git a/src/Controller/Src/Finder/Finder.cpp b/src/Controller/Src/Finder/Finder.cpp +index 8e24f2f..13039cf 100644 +--- a/src/Controller/Src/Finder/Finder.cpp ++++ b/src/Controller/Src/Finder/Finder.cpp +@@ -38,6 +38,9 @@ namespace epsonscan { + } + SDIDeviceInfo* Finder::GetDevicesPointer() + { ++ if (devices_.size() == 0) { ++ return nullptr; ++ } + return &devices_[0]; + } + |