
Dear Wolfgang Denk,
-----Original Message----- From: Wolfgang Denk [mailto:wd@denx.de] Sent: Friday, May 31, 2013 4:23 PM To: Piotr Wilczek Cc: u-boot@lists.denx.de; Minkyu Kang; Kyungmin Park; Lukasz Majewski; Anatolij Gustschin Subject: Re: [PATCH] lcd: align bmp header when uncopmressing image
Dear Piotr Wilczek,
In message 1369999573-15449-1-git-send-email-p.wilczek@samsung.com you wrote:
When compressed image is loaded, it must be decompressed to an
aligned
address + 2 to avoid unaligned access exception on some ARM
platforms.
If you do this, you must also account for the up to 2 additional bytes needed in the allocated buffer.
Otherwise you might write over the end of the buffer...
Because 8-byte alignment is guaranteed by malloc I don't think might over write anything when moving by only 2 bytes. But you are right that in principle extra bytes should be allocated.
Best regards,
Wolfgang Denk
-- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de Die ganzen Zahlen hat der liebe Gott geschaffen, alles andere ist Menschenwerk... Leopold Kronecker
Best regards, Piotr Wilczek