From a0c2f97158701728c15a3134fabda6407596ea9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sun, 27 Mar 2022 15:26:54 +0200 Subject: d/changelog: Change distribution to unstable, Change date and time --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 8950f99..7e37351 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -sane-backends (1.1.1-5) UNRELEASED; urgency=medium +sane-backends (1.1.1-5) unstable; urgency=medium * debian/rules: - Change configure parameter --enable-parport-directio to use only on @@ -6,7 +6,7 @@ sane-backends (1.1.1-5) UNRELEASED; urgency=medium * debian/control: - Change Build-Depend from virtual package libltdl3-dev to libltdl-dev. - -- Jörg Frings-Fürst Sat, 26 Mar 2022 10:17:02 +0100 + -- Jörg Frings-Fürst Sun, 27 Mar 2022 15:25:30 +0200 sane-backends (1.1.1-4) unstable; urgency=medium -- cgit v1.2.3 From 6eb7fbf271c46abaa0d2847bc269c0c9ff4d2c80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sun, 27 Mar 2022 18:31:06 +0200 Subject: genesys: Fix out off memory on high resultions --- debian/changelog | 3 + ...195-genesys_fix_total_file_size_exceeding.patch | 100 +++++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 104 insertions(+) create mode 100644 debian/patches/0195-genesys_fix_total_file_size_exceeding.patch diff --git a/debian/changelog b/debian/changelog index 7e37351..12ee876 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,9 @@ sane-backends (1.1.1-5) unstable; urgency=medium hurd-i386 (Closes: #1008488). * debian/control: - Change Build-Depend from virtual package libltdl3-dev to libltdl-dev. + * New debian/patches/0195-genesys_fix_total_file_size_exceeding.patch: + - Fix out off memory on high resultions (Closes: #942176) + Cherry-picked from upstream. -- Jörg Frings-Fürst Sun, 27 Mar 2022 15:25:30 +0200 diff --git a/debian/patches/0195-genesys_fix_total_file_size_exceeding.patch b/debian/patches/0195-genesys_fix_total_file_size_exceeding.patch new file mode 100644 index 0000000..4b95241 --- /dev/null +++ b/debian/patches/0195-genesys_fix_total_file_size_exceeding.patch @@ -0,0 +1,100 @@ +Description: Fix out off memory on high resultions +Origin: upstream, https://gitlab.com/sane-project/backends/-/merge_requests/697 +Bug: https://gitlab.com/sane-project/backends/-/issues/580 +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=942176 +Forwarded: no +Last-Update: 2022-03-27 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +Index: trunk/backend/genesys/gl124.cpp +=================================================================== +--- trunk.orig/backend/genesys/gl124.cpp ++++ trunk/backend/genesys/gl124.cpp +@@ -745,7 +745,7 @@ void CommandSetGl124::init_regs_for_scan + dev->session = session; + + dev->total_bytes_read = 0; +- dev->total_bytes_to_read = session.output_line_bytes_requested * session.params.lines; ++ dev->total_bytes_to_read = (size_t)session.output_line_bytes_requested * (size_t)session.params.lines; + + DBG(DBG_info, "%s: total bytes to send to frontend = %zu\n", __func__, + dev->total_bytes_to_read); +Index: trunk/backend/genesys/gl646.cpp +=================================================================== +--- trunk.orig/backend/genesys/gl646.cpp ++++ trunk/backend/genesys/gl646.cpp +@@ -817,7 +817,8 @@ void CommandSetGl646::init_regs_for_scan + dev->session = session; + + dev->total_bytes_read = 0; +- dev->total_bytes_to_read = session.output_line_bytes_requested * session.params.lines; ++ dev->total_bytes_to_read = (size_t) session.output_line_bytes_requested ++ * (size_t) session.params.lines; + + /* select color filter based on settings */ + regs->find_reg(0x04).value &= ~REG_0x04_FILTER; +Index: trunk/backend/genesys/gl841.cpp +=================================================================== +--- trunk.orig/backend/genesys/gl841.cpp ++++ trunk/backend/genesys/gl841.cpp +@@ -920,7 +920,7 @@ dummy \ scanned lines + dev->session = session; + + dev->total_bytes_read = 0; +- dev->total_bytes_to_read = session.output_line_bytes_requested * session.params.lines; ++ dev->total_bytes_to_read = (size_t)session.output_line_bytes_requested * (size_t)session.params.lines; + if (session.use_host_side_gray) { + dev->total_bytes_to_read /= 3; + } +Index: trunk/backend/genesys/gl842.cpp +=================================================================== +--- trunk.orig/backend/genesys/gl842.cpp ++++ trunk/backend/genesys/gl842.cpp +@@ -568,7 +568,7 @@ void CommandSetGl842::init_regs_for_scan + dev->session = session; + + dev->total_bytes_read = 0; +- dev->total_bytes_to_read = session.output_line_bytes_requested * session.params.lines; ++ dev->total_bytes_to_read = (size_t)session.output_line_bytes_requested * (size_t)session.params.lines; + } + + ScanSession CommandSetGl842::calculate_scan_session(const Genesys_Device* dev, +Index: trunk/backend/genesys/gl843.cpp +=================================================================== +--- trunk.orig/backend/genesys/gl843.cpp ++++ trunk/backend/genesys/gl843.cpp +@@ -1041,7 +1041,7 @@ void CommandSetGl843::init_regs_for_scan + dev->session = session; + + dev->total_bytes_read = 0; +- dev->total_bytes_to_read = session.output_line_bytes_requested * session.params.lines; ++ dev->total_bytes_to_read = (size_t)session.output_line_bytes_requested * (size_t)session.params.lines; + + DBG(DBG_info, "%s: total bytes to send = %zu\n", __func__, dev->total_bytes_to_read); + } +Index: trunk/backend/genesys/gl846.cpp +=================================================================== +--- trunk.orig/backend/genesys/gl846.cpp ++++ trunk/backend/genesys/gl846.cpp +@@ -658,7 +658,7 @@ void CommandSetGl846::init_regs_for_scan + dev->session = session; + + dev->total_bytes_read = 0; +- dev->total_bytes_to_read = session.output_line_bytes_requested * session.params.lines; ++ dev->total_bytes_to_read = (size_t)session.output_line_bytes_requested * (size_t)session.params.lines; + + DBG(DBG_info, "%s: total bytes to send = %zu\n", __func__, dev->total_bytes_to_read); + } +Index: trunk/backend/genesys/gl847.cpp +=================================================================== +--- trunk.orig/backend/genesys/gl847.cpp ++++ trunk/backend/genesys/gl847.cpp +@@ -624,7 +624,7 @@ void CommandSetGl847::init_regs_for_scan + dev->session = session; + + dev->total_bytes_read = 0; +- dev->total_bytes_to_read = session.output_line_bytes_requested * session.params.lines; ++ dev->total_bytes_to_read = (size_t)session.output_line_bytes_requested * (size_t)session.params.lines; + + DBG(DBG_info, "%s: total bytes to send = %zu\n", __func__, dev->total_bytes_to_read); + } diff --git a/debian/patches/series b/debian/patches/series index 9b8d1e2..4b9da30 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +1,4 @@ +0195-genesys_fix_total_file_size_exceeding.patch 0035-trim-libraries-in-sane-backends.pc.in.patch 0040-remove_git.patch 0100-source_spelling.patch -- cgit v1.2.3 From b665385fe074122f14dedceb84c8e8e3424296ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sun, 27 Mar 2022 18:32:07 +0200 Subject: d/changelog: Change date and time --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 12ee876..93a91d7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,7 +9,7 @@ sane-backends (1.1.1-5) unstable; urgency=medium - Fix out off memory on high resultions (Closes: #942176) Cherry-picked from upstream. - -- Jörg Frings-Fürst Sun, 27 Mar 2022 15:25:30 +0200 + -- Jörg Frings-Fürst Sun, 27 Mar 2022 18:31:28 +0200 sane-backends (1.1.1-4) unstable; urgency=medium -- cgit v1.2.3