On Mon, Nov 13, 2023 at 12:23:45PM -0800, Steve Sistare wrote: > Coverity diagnoses a possible out-of-range array index here ... > > static GSList *migration_blockers[MIG_MODE__MAX]; > > fill_source_migration_info() { > GSList *cur_blocker = migration_blockers[migrate_mode()]; > > ... because it does not know that MIG_MODE__MAX will never be returned as > a migration mode. To fix, assert so in migrate_mode(). > > Fixes: fa3673e497a1 ("migration: per-mode blockers") > > Reported-by: Peter Maydell <peter.mayd...@linaro.org> > Suggested-by: Peter Maydell <peter.mayd...@linaro.org> > Signed-off-by: Steve Sistare <steven.sist...@oracle.com>
queued. -- Peter Xu