netresolve/netresolve-0.0.1-hosts.patch

29 lines
658 B
Diff

From 1b41d34516968023c9eb97f0050f7393982c073b Mon Sep 17 00:00:00 2001
From: Petr Mensik <pemensik@redhat.com>
Date: Tue, 10 Sep 2019 16:54:24 +0200
Subject: [PATCH] Fix incorrect reading of hosts
When last line is missing newline, data are not correctly read. Parse
also remaining parse space.
---
backends/hosts.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/backends/hosts.c b/backends/hosts.c
index d3a076c..a93f74c 100644
--- a/backends/hosts.c
+++ b/backends/hosts.c
@@ -160,7 +160,8 @@ read_list(struct hosts_list *list)
new = buffer - 1;
}
}
-
+
+ read_item(list, buffer);
}
out:
close(fd);
--
2.20.1