Verify the number of splits

This commit is contained in:
Andrea Mazzoleni 2026-05-20 00:17:46 +02:00
parent 9d7dcdd479
commit b428cd80cc

View file

@ -3088,6 +3088,14 @@ static void state_read_content(struct snapraid_state* state, const char* path, S
/* LCOV_EXCL_STOP */
}
if (v_split_mac > SPLIT_MAX) {
/* LCOV_EXCL_START */
decoding_error(path, f);
log_fatal(ECONTENT, "Too many splits '%u' in the content file!\n", v_split_mac);
exit(EXIT_FAILURE);
/* LCOV_EXCL_STOP */
}
if (v_level >= LEV_MAX) {
/* LCOV_EXCL_START */
decoding_error(path, f);