]> git.sur5r.net Git - u-boot/commit
env: fix potential stack overflow in environment functions
authorRob Herring <rob.herring@calxeda.com>
Fri, 22 Mar 2013 11:26:21 +0000 (11:26 +0000)
committerTom Rini <trini@ti.com>
Tue, 2 Apr 2013 20:23:34 +0000 (16:23 -0400)
commit60d7d5a63189c9f77a190c9965861dc15482c2d0
tree68bf7c543f8f282142eb7a10c700b3a3d86341fb
parentc17b94ec5ec89c63070dd385b6c3a6645761c405
env: fix potential stack overflow in environment functions

Most of the various environment functions create CONFIG_ENV_SIZE buffers on
the stack. At least on ARM and PPC which have 4KB stacks, this can overflow
the stack if we have large environment sizes. So move all the buffers off
the stack to static buffers.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
common/env_dataflash.c
common/env_eeprom.c
common/env_fat.c
common/env_mmc.c
common/env_nand.c
common/env_nvram.c
common/env_onenand.c
common/env_sf.c