From: tb Date: Fri, 27 Sep 2024 12:52:58 +0000 (+0000) Subject: rpki-client: check for getline error when reading the skiplist file X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=27e47f522cacdaa21666f34c550dd0c6d88e3919;p=openbsd rpki-client: check for getline error when reading the skiplist file ok claudio --- 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);