diff options
author | Andrew Goodbody <andrew.goodbody@linaro.org> | 2025-07-03 11:00:33 +0100 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2025-07-14 15:16:30 -0600 |
commit | bae3a34cb9e6b3ce6d01f68cdd34cdd45419f22f (patch) | |
tree | 82b2d28681b772356d38012afdfefefe60c25e24 /drivers/ddr/imx/imx8ulp/ddr_init.c | |
parent | ebfbc77109a1fee5db71f767dd1f58d7c68bb442 (diff) |
cros_ec: sandbox: Use correct value for number of slots
In the definition of struct ec_state the number of slots that are
created is VSTORE_SLOT_COUNT (==4) but the value of req->slot is
checked against EC_VSTORE_SLOT_MAX (==32) so this can lead to memory
access beyond that allocated.
Instead change the size check to use VSTORE_SLOT_COUNT to ensure it
matches what has actually been allocated.
This issue found by Smatch.
Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Diffstat (limited to 'drivers/ddr/imx/imx8ulp/ddr_init.c')
0 files changed, 0 insertions, 0 deletions