On Thu, 29 Oct 2020 at 20:38, Eduardo Habkost <ehabk...@redhat.com> wrote: > > Fix bounds check for idx at freq_to_str(), to actually ensure idx > never goes beyond the last element of the suffixes array. > > Reported-by: Coverity (CID 1435957: OVERRUN) > Suggested-by: Peter Maydell <peter.mayd...@linaro.org>
Personally I preferred the other option (remove the idx check from the while loop and assert that idx is in bounds after the loop)... > Signed-off-by: Eduardo Habkost <ehabk...@redhat.com> thanks -- PMM