Skip to content
Snippets Groups Projects
Commit 78b2de80 authored by Stephen Warren's avatar Stephen Warren Committed by Tom Rini
Browse files

env_nand: fix incorrect size parameter to ALLOC_CACHE_ALIGN_BUFFER


The third parameter to ALLOC_CACHE_ALIGN_BUFFER is not size (as named),
but rather count (number of elements of the type to allocate). The
current code ends up allocating one copy of env_t for each byte in its
size, which quite possibly ends up overflowing RAM.

This fixes a bug in commit 3801a15f "env_nand: align NAND buffers".

Reported-by: default avatarPrabhakar Lad <prabhakar.csengg@gmail.com>
Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
Reported-by: default avatarPrabhakar Lad <prabhakar.lad@ti.com>
parent 535c74f8
No related branches found
No related tags found
Loading
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