u-boot/drivers/dfu
Przemyslaw Marczak f597fc3d4c dfu: dfu_get_buf: check the value of env dfu_bufsiz before use
In function dfu_get_buf(), the size of allocated buffer could
be defined by the env variable. The size from this variable
was passed for memalign() without checking its value.
And the the memalign will return non null pointer for size 0.

This could possibly cause data abort, so now the value of var
is checked before use. And if this variable is set to 0 then
the default size will be used.

This commit also changes the base passed to simple_strtoul()
to 0. Now decimal and hex values can be used for the variable
dfu_bufsiz.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Tested-by: Lukasz Majewski <l.majewski@samsung.com>
[TestHW: Exynos4412-Trats2]
2014-12-18 12:26:06 +01:00
..
dfu_mmc.c dfu: mmc: check if mmc device exists in mmc_block_op() 2014-12-18 12:26:06 +01:00
dfu_nand.c dfu: defer parsing of device string to IO backend 2014-08-09 11:16:58 -04:00
dfu_ram.c dfu: defer parsing of device string to IO backend 2014-08-09 11:16:58 -04:00
dfu_sf.c dm: Add spi.h header to a few files 2014-10-22 10:36:47 -06:00
dfu.c dfu: dfu_get_buf: check the value of env dfu_bufsiz before use 2014-12-18 12:26:06 +01:00
Kconfig kconfig: add blank Kconfig files 2014-09-24 18:30:28 -04:00
Makefile dfu: add SF backend 2014-08-09 11:16:59 -04:00