[U-Boot] part: Allocate only one legacy_mbr buffer

Tom Rini trini at konsulko.com
Thu Feb 8 12:27:05 UTC 2018


On Mon, Jan 29, 2018 at 10:58:24PM +0300, Alexey Brodkin wrote:

> 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 at synopsys.com>
> Cc: Rob Clark <robdclark at gmail.com>
> Cc: Peter Jones <pjones at redhat.com>
> Cc: Alexander Graf <agraf at suse.de>
> Cc: Tom Rini <trini at konsulko.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180208/eee57c48/attachment.sig>


More information about the U-Boot mailing list