part_dos: fix crash with big sector size
authorSergei Shtylyov <sshtylyov@ru.mvista.com>
Fri, 3 Jun 2011 09:37:43 +0000 (09:37 +0000)
committerWolfgang Denk <wd@denx.de>
Wed, 27 Jul 2011 21:41:33 +0000 (23:41 +0200)
commit54193c5d8133f4f35267f412e5c1bbcbc6ac041c
treeffbad593301b722229711c4e7589de8ae8fc227b
parent4204298db0c5fcf14de852c9b2c6ac3324b106b1
part_dos: fix crash with big sector size

Apple iPod nanos have sector sizes of 2 or 4 KiB, which crashes U-Boot when it
tries to read the MBR into 512-byte buffer situated on stack. Instead use the
variable length arrays to be safe with any large sector size.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
disk/part_dos.c
disk/part_dos.h