Dear Piotr Wilczek, In message <000601ce6021$fcb8f490$f62addb0$%wilc...@samsung.com> you wrote: > > > 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.
Oops??? Initial alignment has NOTHING to do with writing over the allocated end of memory! > But you are right that in principle extra bytes should be allocated. This is not a questions of "pricniple", but plainly of invoking undefined behaviour. Please fix. 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: w...@denx.de A direct quote from the Boss: "We passed over a lot of good people to get the ones we hired." _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot