Skip to content
Snippets Groups Projects
Commit db18f548 authored by Peng Fan's avatar Peng Fan Committed by Tom Rini
Browse files

common: env_flags: fix loop condition when using env_flags_varaccess_mask


We should use ARRAY_SIZE, but not sizeof. The size of
env_flags_varaccess_mask is 16bytes, but we only need 4 loops.
If using 16 as the end condition, we may access memory that
not belong to array env_flags_varaccess_mask.

Signed-off-by: default avatarPeng Fan <peng.fan@nxp.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: York Sun <yorksun@freescale.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
Acked-by: default avatarJoe Hershberger <joe.hershberger@ni.com>
parent bb08a6e7
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment