Re: [PATCH] commands: md: don't leak heap memory with unaligned accesses

2021-06-21 Thread Sascha Hauer
On Sat, Jun 19, 2021 at 07:42:17AM +0200, Ahmad Fatoum wrote: > Doing unaligned near file end returns bogus results: > > barebox@Sandbox:/ md -s /dev/stickypage 4095 > 0fff: 959ff8ff . > > That 0x959ff8 is heap memory next to the buffer

[PATCH] commands: md: don't leak heap memory with unaligned accesses

2021-06-18 Thread Ahmad Fatoum
Doing unaligned near file end returns bogus results: barebox@Sandbox:/ md -s /dev/stickypage 4095 0fff: 959ff8ff . That 0x959ff8 is heap memory next to the buffer md had allocated. Fix this by adding some zeroed padding after the