Compare commits

..

1 Commits
rawhide ... f33

Author SHA1 Message Date
Petr Menšík c5baafb5b7 Rebuild for new ldns 2021-06-02 12:32:43 +02:00
2 changed files with 3 additions and 61 deletions

View File

@ -1,41 +0,0 @@
From 1f30af480852de8aa9ccba77a99d55b06832fc87 Mon Sep 17 00:00:00 2001
From: Petr Mensik <pemensik@redhat.com>
Date: Sat, 22 Jan 2022 17:51:48 +0100
Subject: [PATCH] Ensure variable is not used after free
Move free to end of function, where it would not need that variable
again.
---
backends/hosts.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/backends/hosts.c b/backends/hosts.c
index a93f74c..2378b6f 100644
--- a/backends/hosts.c
+++ b/backends/hosts.c
@@ -126,13 +126,13 @@ read_list(struct hosts_list *list)
char *new;
size_t size;
- free(hosts_file);
if (fd == -1) {
error("Cannot read hosts file '%s': %s", hosts_file, strerror(errno));
goto fail_open;
}
+
while (true) {
if (current == end)
goto out;
@@ -166,6 +166,7 @@ read_list(struct hosts_list *list)
out:
close(fd);
fail_open:
+ free(hosts_file);
add_node(list, NULL, 0, NULL, 0);
list->reserved = list->count;
list->items = realloc(list->items, list->reserved * sizeof *list->items);
--
2.31.1

View File

@ -2,7 +2,7 @@
Name: netresolve
Version: 0.0.1
Release: 0.34%{?snapshot_suffix}%{?dist}
Release: 0.29%{?snapshot_suffix}%{?dist}
Summary: Generic name resolution library
License: BSD
# https://github.com/crossdistro/netresolve , possibly?
@ -14,9 +14,7 @@ Patch0: netresolve-0.0.1-test-equality.patch
Patch1: netresolve-0.0.1-strncpy.patch
# https://github.com/crossdistro/netresolve/issues/3
Patch2: netresolve-0.0.1-hosts.patch
Patch3: netresolve-0.0.1-use-after-free.patch
BuildRequires: make
BuildRequires: ldns-devel
BuildRequires: pkgconfig(libcares)
%if 0%{?fedora}
@ -238,23 +236,8 @@ make check || { cat ./test-suite.log; false; }
%{_libdir}/libnss_netresolve.so
%changelog
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.1-0.34.20160317git
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Sat Jan 22 2022 Petr Menšík <pemensik@redhat.com> - 0.0.1-0.33.20160317git
- Correct compilation issues
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.1-0.32.20160317git
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.1-0.31.20160317git
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.1-0.30.20160317git
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Sat Dec 19 2020 Adam Williamson <awilliam@redhat.com> - 0.0.1-0.29.20160317git
- Rebuild for libldns soname bump
* Wed Jun 02 2021 Petr Menšík <pemensik@redhat.com> - 0.0.1-0.29.20160317git
- Rebuild for new ldns
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.1-0.28.20160317git
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild