From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sergei Shtylyov Date: Tue, 26 Jul 2011 22:57:33 +0400 Subject: [U-Boot] [PATCH] part_dos: fix crash with big sector size In-Reply-To: <201106032337.43523.sshtylyov@ru.mvista.com> References: <201106032337.43523.sshtylyov@ru.mvista.com> Message-ID: <4E2F0E1D.5060506@mvista.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello. I wrote: > 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 > --- > The same change is probably needed for disk/part_amiga.c but I'm not really > sure if Amiga supports USB... :-) Damn, the FAT code is also hardwired for 512-byte sectors. I wonder which century we are in? :-) WBR, Sergei