Update to latest version.

This commit is contained in:
Elliott Sales de Andrade 2020-10-10 06:06:53 -04:00
parent 8119e30d26
commit 61be200755
4 changed files with 6 additions and 39 deletions

1
.gitignore vendored
View File

@ -5,3 +5,4 @@
/libinsane-1.0.4.tar.gz
/libinsane-1.0.6.tar.gz
/libinsane-1.0.7.tar.gz
/libinsane-1.0.8.tar.gz

View File

@ -1,35 +0,0 @@
From e90e9d982e344da89c1746606990df7709bb88df Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Wed, 2 Sep 2020 06:18:36 -0400
Subject: [PATCH] Fix execute_session_scan_read on big endian machines.
The buffer contains an `int`, and `msg_out->raw.iov_len` is a `size_t`,
which is twice the size on 64-bit machines. On big-endian machines, the
4 bytes of the `int` will be put in the MSB, meaning `malloc` will be
called with a really big number.
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
---
.../libinsane/src/workarounds/dedicated_process/worker.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/subprojects/libinsane/src/workarounds/dedicated_process/worker.c b/subprojects/libinsane/src/workarounds/dedicated_process/worker.c
index e6a84e3..732d8e9 100644
--- a/subprojects/libinsane/src/workarounds/dedicated_process/worker.c
+++ b/subprojects/libinsane/src/workarounds/dedicated_process/worker.c
@@ -630,9 +630,11 @@ static enum lis_error execute_session_scan_read(struct lis_msg *msg_in, struct l
{
const void *ptr_in;
struct lis_scan_session *session;
+ int buffer_size;
ptr_in = msg_in->raw.iov_base;
- lis_unpack(&ptr_in, "pd", &session, &msg_out->raw.iov_len);
+ lis_unpack(&ptr_in, "pd", &session, &buffer_size);
+ msg_out->raw.iov_len = buffer_size;
msg_out->raw.iov_base = malloc(msg_out->raw.iov_len);
if (msg_out->raw.iov_base == NULL) {
--
2.26.2

View File

@ -1,13 +1,11 @@
Name: libinsane
Version: 1.0.7
Version: 1.0.8
Release: 1%{?dist}
Summary: Cross-platform access to image scanners
License: LGPLv3+
URL: https://doc.openpaper.work/libinsane/latest/
Source0: https://gitlab.gnome.org/World/OpenPaperwork/%{name}/-/archive/%{version}/%{name}-%{version}.tar.gz
# https://gitlab.gnome.org/World/OpenPaperwork/libinsane/-/merge_requests/37
Patch0001: 0001-Fix-execute_session_scan_read-on-big-endian-machines.patch
BuildRequires: meson
BuildRequires: gcc
@ -120,6 +118,9 @@ Vala bindings for libinsane.
%changelog
* Sat Oct 10 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.0.8-1
- Update to latest version (#1886948)
* Tue Sep 01 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.0.7-1
- Update to latest version (#1873874)

View File

@ -1 +1 @@
SHA512 (libinsane-1.0.7.tar.gz) = 9c9f884fa3f99a7b04882a4cf866ab5c0b7abb1f60ac75ba921856184ad1471de41dc5a0c312eba93eb82c75d54bea9e30c76f2ee8b647904da700e013fe3ba9
SHA512 (libinsane-1.0.8.tar.gz) = 810a7e7005b93a4da53aefa6b3c63824800eba5fee9b945d45f64372a98e04e6fd5fd554db817f2b41c481ec78b3723b151337de6cb5784d423868e19bd36aa3