]> git.sur5r.net Git - u-boot/commit
part: Allocate only one legacy_mbr buffer
authorAlexey Brodkin <Alexey.Brodkin@synopsys.com>
Mon, 29 Jan 2018 19:58:24 +0000 (22:58 +0300)
committerTom Rini <trini@konsulko.com>
Thu, 8 Feb 2018 03:06:17 +0000 (22:06 -0500)
commit8639e34d2c5e12cc2e45c95b1a2e97c22bf6a711
tree5530c592a371ab178ce6ab64df813623bfbbd941
parent6808ef9ac2a66a261bf341a99c3edb1e69f1cbdd
part: Allocate only one legacy_mbr buffer

Commit ff98cb90514d ("part: extract MBR signature from partitions")
blindly switched allocated by ALLOC_CACHE_ALIGN_BUFFER buffer type from
"unsigned char" to "legacy_mbr" which caused allocation of size =
(typeof(legacy_mbr) * dev_desc->blksize) instead of just space enough
for "legacy_mbr" structure.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Rob Clark <robdclark@gmail.com>
Cc: Peter Jones <pjones@redhat.com>
Cc: Alexander Graf <agraf@suse.de>
Cc: Tom Rini <trini@konsulko.com>
disk/part_dos.c