From 27e47f522cacdaa21666f34c550dd0c6d88e3919 Mon Sep 17 00:00:00 2001 From: tb Date: Fri, 27 Sep 2024 12:52:58 +0000 Subject: [PATCH] rpki-client: check for getline error when reading the skiplist file ok claudio --- usr.sbin/rpki-client/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/usr.sbin/rpki-client/main.c b/usr.sbin/rpki-client/main.c index 1399cc8648a..be1d4ec8a55 100644 --- a/usr.sbin/rpki-client/main.c +++ b/usr.sbin/rpki-client/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.266 2024/09/04 15:46:43 job Exp $ */ +/* $OpenBSD: main.c,v 1.267 2024/09/27 12:52:58 tb Exp $ */ /* * Copyright (c) 2021 Claudio Jeker * Copyright (c) 2019 Kristaps Dzonsons @@ -878,6 +878,8 @@ load_skiplist(const char *slf) LIST_INSERT_HEAD(&skiplist, le, entry); stats.skiplistentries++; } + if (ferror(fp)) + err(1, "error reading %s", slf); fclose(fp); free(line); -- 2.20.1