mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 16:52:14 +02:00
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>
This commit is contained in:
committed by
Wolfgang Denk
parent
4204298db0
commit
54193c5d81
@@ -25,13 +25,6 @@
|
||||
#define _DISK_PART_DOS_H
|
||||
|
||||
|
||||
#ifdef CONFIG_ISO_PARTITION
|
||||
/* Make the buffers bigger if ISO partition support is enabled -- CD-ROMS
|
||||
have 2048 byte blocks */
|
||||
#define DEFAULT_SECTOR_SIZE 2048
|
||||
#else
|
||||
#define DEFAULT_SECTOR_SIZE 512
|
||||
#endif
|
||||
#define DOS_PART_TBL_OFFSET 0x1be
|
||||
#define DOS_PART_MAGIC_OFFSET 0x1fe
|
||||
#define DOS_PBR_FSTYPE_OFFSET 0x36
|
||||
|
Reference in New Issue
Block a user