diff --git a/usr.sbin/rpki-client/ccr.c b/usr.sbin/rpki-client/ccr.c index 6a766280562..857e9f9553b 100644 --- a/usr.sbin/rpki-client/ccr.c +++ b/usr.sbin/rpki-client/ccr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ccr.c,v 1.35 2026/04/13 09:22:46 job Exp $ */ +/* $OpenBSD: ccr.c,v 1.36 2026/05/04 17:39:35 job Exp $ */ /* * Copyright (c) 2025 Job Snijders * @@ -1093,6 +1093,12 @@ parse_manifeststate(const char *fn, struct ccr *ccr, const ManifestState *state) state->mostRecentUpdate, &ccr->most_recent_update)) goto out; + if (sk_ManifestInstance_num(state->mis) == 0 && + ccr->most_recent_update != 0) { + warnx("%s: invalid ManifestState mostRecentUpdate", fn); + goto out; + } + if (!parse_mft_instances(fn, ccr, state->mis)) goto out;