1
0
mirror of https://github.com/openbsd/src.git synced 2026-06-18 15:23:33 +02:00

Explicitly check mostRecentUpdate on otherwise empty ManifestState

OK tb@
This commit is contained in:
job
2026-05-04 17:39:35 +00:00
parent 9803fad78e
commit 3173199dac
+7 -1
View File
@@ -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 <job@openbsd.org>
*
@@ -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;