Re: [PATCH 1/2] migration: Assert that migrate_multifd_compression() returns an in-range value

2022-07-22 Thread Juan Quintela
Peter Maydell wrote: > Coverity complains that when we use the return value from > migrate_multifd_compression() as an array index: > multifd_recv_state->ops = multifd_ops[migrate_multifd_compression()]; > > that this might overrun the array (which is declared to have size > MULTIFD_COMPRESSION_

Re: [PATCH 1/2] migration: Assert that migrate_multifd_compression() returns an in-range value

2022-07-21 Thread Dr. David Alan Gilbert
* Peter Maydell (peter.mayd...@linaro.org) wrote: > Coverity complains that when we use the return value from > migrate_multifd_compression() as an array index: > multifd_recv_state->ops = multifd_ops[migrate_multifd_compression()]; > > that this might overrun the array (which is declared to hav

[PATCH 1/2] migration: Assert that migrate_multifd_compression() returns an in-range value

2022-07-21 Thread Peter Maydell
Coverity complains that when we use the return value from migrate_multifd_compression() as an array index: multifd_recv_state->ops = multifd_ops[migrate_multifd_compression()]; that this might overrun the array (which is declared to have size MULTIFD_COMPRESSION__MAX). This is because the funct