]> git.baikalelectronics.ru Git - uboot.git/commit
disk: part_dos: Allocate at least one block size for mbr
authorFaiz Abbas <faiz_abbas@ti.com>
Wed, 4 Sep 2019 14:40:12 +0000 (20:10 +0530)
committerTom Rini <trini@konsulko.com>
Thu, 19 Sep 2019 16:54:29 +0000 (12:54 -0400)
commit5aae99c1147d419c76e7090afb7b9003ab19c507
tree06527700b485fdc29816ce06ed8e6df230431ffb
parentfc45b9b3d2431ddc152ea464970feec21942a9e4
disk: part_dos: Allocate at least one block size for mbr

The blk_dread() following the mbr allocation reads one block from the
device. This will lead to overflow if block size is greater than the
size of legacy_mbr. Fix this by allocating at least one block size.

Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Acked-by: Alexey Brodkin <abrodkin@synopsys.com>
disk/part_dos.c