diff --git a/Add-check-for-ports-to-avoid-Segmentation-fault.patch b/Add-check-for-ports-to-avoid-Segmentation-fault.patch new file mode 100644 index 0000000..79d9950 --- /dev/null +++ b/Add-check-for-ports-to-avoid-Segmentation-fault.patch @@ -0,0 +1,37 @@ +From d7bd15792ea3d2613aa5a0b09d948dc2ef77dfcf Mon Sep 17 00:00:00 2001 +From: lingsheng +Date: Wed, 27 Jan 2021 15:00:32 +0800 +Subject: [PATCH] Add check for ports to avoid Segmentation fault + +--- + tools/umax_pp.c | 13 ++++++++----- + 1 file changed, 8 insertions(+), 5 deletions(-) + +diff --git a/tools/umax_pp.c b/tools/umax_pp.c +index 7b127e3..00ffea9 100644 +--- a/tools/umax_pp.c ++++ b/tools/umax_pp.c +@@ -355,12 +355,15 @@ main (int argc, char **argv) + if (rc != 1) + { + ports = sanei_parport_find_port (); +- i = 0; +- rc = 0; +- while ((ports[i] != NULL) && (rc != 1)) ++ if (ports != NULL) + { +- rc = sanei_umax_pp_initPort (strtol (ports[i], NULL, 16), NULL); +- i++; ++ i = 0; ++ rc = 0; ++ while ((ports[i] != NULL) && (rc != 1)) ++ { ++ rc = sanei_umax_pp_initPort (strtol (ports[i], NULL, 16), NULL); ++ i++; ++ } + } + } + if (rc != 1) +-- +2.23.0 + diff --git a/sane-backends.spec b/sane-backends.spec index be2e779..edaffe4 100644 --- a/sane-backends.spec +++ b/sane-backends.spec @@ -3,7 +3,7 @@ Name: sane-backends Version: 1.0.28 -Release: 8 +Release: 9 Summary: Scanner access software License: GPLv2+ and GPLv2+ with exceptions and Public Domain and IJG and LGPLv2+ and MIT URL: http://www.sane-project.org @@ -23,6 +23,7 @@ Patch0001: sane-xerox-mfp-blacklist-C460-for-JPEG.patch Patch0002: sane-genesys-vector-glibcxxassert.patch Patch0003: CVE-2020-12861-CVE-2020-12866-CVE-2020-12864.patch Patch0004: CVE-2020-12867.patch +Patch0005: Add-check-for-ports-to-avoid-Segmentation-fault.patch %description SANE (Scanner Access Now Easy) is a sane and simple interface to both local and networked scanners @@ -205,6 +206,9 @@ exit 0 %{_unitdir}/* %changelog +* Wed Jan 27 2021 lingsheng - 1.0.28-9 +- Add check for ports to avoid Segmentation fault + * Mon Jan 18 2021 zhanghua - 1.0.28-8 - fix CVE-2020-12867