1882520 - Crash on libsane-airscan when trying to activate scanner

This commit is contained in:
Zdenek Dohnal 2020-10-07 07:06:15 +02:00
parent 82b0e5d9cf
commit e845117c96
2 changed files with 31 additions and 1 deletions

View File

@ -0,0 +1,24 @@
From 850654147750750283cd85c2adc133dbc7773f88 Mon Sep 17 00:00:00 2001
From: Alexander Pevzner <pzz@apevzner.com>
Date: Fri, 2 Oct 2020 12:27:18 +0300
Subject: [PATCH] HTTP: fixed crash if host name is not resolvable (#77)
---
airscan-http.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/airscan-http.c b/airscan-http.c
index fa81da0..eba539d 100644
--- a/airscan-http.c
+++ b/airscan-http.c
@@ -2759,6 +2759,7 @@ http_query_start_processing (void *p)
rc = getaddrinfo(host, port, &hints, &q->addrs);
if (rc != 0) {
http_query_complete(q, ERROR(gai_strerror(rc)));
+ return;
}
q->addr_next = q->addrs;
--
2.26.2

View File

@ -5,13 +5,16 @@
Name: sane-airscan
Version: 0.99.16
Release: 1%{?dist}
Release: 2%{?dist}
Summary: SANE backend for AirScan (eSCL) and WSD document scanners
# the exception is defined in LICENSE, meant for SANE project in most cases
License: GPLv2+ with exceptions
URL: https://github.com/alexpevzner/sane-airscan
Source: %{URL}/archive/%{version}/%{name}-%{version}.tar.gz
# backported from upstream
Patch01: 0001-HTTP-fixed-crash-if-host-name-is-not-resolvable-77.patch
# needed for querying and getting mDNS messages from local network
BuildRequires: avahi-devel
@ -81,6 +84,9 @@ mkdir -p %{buildroot}/
%changelog
* Mon Oct 05 2020 Zdenek Dohnal <zdohnal@redhat.com> - 0.99.16-2
- 1882520 - Crash on libsane-airscan when trying to activate scanner
* Tue Sep 01 2020 Zdenek Dohnal <zdohnal@redhat.com> - 0.99.16-1
- 0.99.16