mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 18:23:57 -06:00
softfloat: Pad array size in pick_nan_muladd
While all indices into val[] should be in [0-2], the mask applied is two bits. To help static analysis see there is no possibility of read beyond the end of the array, pad the array to 4 entries, with the final being (implicitly) NULL. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-id: 20241203203949.483774-6-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
229416c67e
commit
8704c753e8
1 changed files with 1 additions and 1 deletions
|
@ -106,7 +106,7 @@ static FloatPartsN *partsN(pick_nan_muladd)(FloatPartsN *a, FloatPartsN *b,
|
|||
}
|
||||
ret = c;
|
||||
} else {
|
||||
FloatPartsN *val[3] = { a, b, c };
|
||||
FloatPartsN *val[R_3NAN_1ST_MASK + 1] = { a, b, c };
|
||||
Float3NaNPropRule rule = s->float_3nan_prop_rule;
|
||||
|
||||
assert(rule != float_3nan_prop_none);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue