[PATCH] ash: use memmove instead of mempcpy in subevalvar

2022-02-27 Thread Ariadne Conill
While investigating a sporadic crash issue relating to variable substitution in Alpine Linux, we managed to get a reliable crash when building BusyBox with ASan, due to the source and destination overlapping for mempcpy, which resulted in sporadic data corruption outside ASan. Per POSIX, memcpy

Re: [PATCH] ash: use memmove instead of mempcpy in subevalvar

2022-02-26 Thread Hadrien Lacour
On Sat, Feb 26, 2022 at 06:11:30PM +, Ariadne Conill wrote: > While investigating a sporadic crash issue relating to variable substitution > in > Alpine Linux, we managed to get a reliable crash when building BusyBox with > ASan, > due to the source and destination overlapping for mempcpy,

[PATCH] ash: use memmove instead of mempcpy in subevalvar

2022-02-26 Thread Ariadne Conill
While investigating a sporadic crash issue relating to variable substitution in Alpine Linux, we managed to get a reliable crash when building BusyBox with ASan, due to the source and destination overlapping for mempcpy, which resulted in sporadic data corruption outside ASan. Per POSIX, memcpy