Compare commits
No commits in common. "rawhide" and "f35" have entirely different histories.
@ -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
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Name: netresolve
|
Name: netresolve
|
||||||
Version: 0.0.1
|
Version: 0.0.1
|
||||||
Release: 0.34%{?snapshot_suffix}%{?dist}
|
Release: 0.31%{?snapshot_suffix}%{?dist}
|
||||||
Summary: Generic name resolution library
|
Summary: Generic name resolution library
|
||||||
License: BSD
|
License: BSD
|
||||||
# https://github.com/crossdistro/netresolve , possibly?
|
# https://github.com/crossdistro/netresolve , possibly?
|
||||||
@ -14,7 +14,6 @@ Patch0: netresolve-0.0.1-test-equality.patch
|
|||||||
Patch1: netresolve-0.0.1-strncpy.patch
|
Patch1: netresolve-0.0.1-strncpy.patch
|
||||||
# https://github.com/crossdistro/netresolve/issues/3
|
# https://github.com/crossdistro/netresolve/issues/3
|
||||||
Patch2: netresolve-0.0.1-hosts.patch
|
Patch2: netresolve-0.0.1-hosts.patch
|
||||||
Patch3: netresolve-0.0.1-use-after-free.patch
|
|
||||||
|
|
||||||
BuildRequires: make
|
BuildRequires: make
|
||||||
BuildRequires: ldns-devel
|
BuildRequires: ldns-devel
|
||||||
@ -238,15 +237,6 @@ make check || { cat ./test-suite.log; false; }
|
|||||||
%{_libdir}/libnss_netresolve.so
|
%{_libdir}/libnss_netresolve.so
|
||||||
|
|
||||||
%changelog
|
%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
|
* 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
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user