diff options
author | Sergei Shtylyov <sshtylyov@ru.mvista.com> | 2011-06-03 09:37:43 +0000 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2011-07-27 23:41:33 +0200 |
commit | 54193c5d8133f4f35267f412e5c1bbcbc6ac041c (patch) | |
tree | ffbad593301b722229711c4e7589de8ae8fc227b /disk/part_dos.h | |
parent | 4204298db0c5fcf14de852c9b2c6ac3324b106b1 (diff) | |
download | u-boot-imx-54193c5d8133f4f35267f412e5c1bbcbc6ac041c.zip u-boot-imx-54193c5d8133f4f35267f412e5c1bbcbc6ac041c.tar.gz u-boot-imx-54193c5d8133f4f35267f412e5c1bbcbc6ac041c.tar.bz2 |
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>
Diffstat (limited to 'disk/part_dos.h')
-rw-r--r-- | disk/part_dos.h | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/disk/part_dos.h b/disk/part_dos.h index 195a32c..de75542 100644 --- a/disk/part_dos.h +++ b/disk/part_dos.h @@ -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 |