diff options
author | Steve Sistare <steven.sistare@oracle.com> | 2023-11-13 12:23:45 -0800 |
---|---|---|
committer | Peter Xu <peterx@redhat.com> | 2024-01-04 09:52:42 +0800 |
commit | b12635ff08ab2e5a6a955c6866ef4525fb3deb5d (patch) | |
tree | 4513c46ee5b9405cb64a515a713f607029628a9c /hw/arm/aspeed_ast2400.c | |
parent | 3fc58efa938338a82e4d5c0c031e7e9c98e9544f (diff) |
migration: fix coverity migrate_mode finding
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.maydell@linaro.org>
Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/r/1699907025-215450-1-git-send-email-steven.sistare@oracle.com
Signed-off-by: Peter Xu <peterx@redhat.com>
Diffstat (limited to 'hw/arm/aspeed_ast2400.c')
0 files changed, 0 insertions, 0 deletions