Re: [PATCH v3] unstrip: Stop using strndupa.

2020-10-27 Thread Mark Wielaard
Hi Érico, On Tue, Oct 27, 2020 at 04:19:58PM -0300, Érico Nogueira via Elfutils-devel wrote: > This functon has inherent safety issues, since a long enough path can > lead to memory clobbering. Due to the recursive nature of > make_directories(), multiple calls could also stack overflow. Instead,

[PATCH v3] unstrip: Stop using strndupa.

2020-10-27 Thread Érico Nogueira via Elfutils-devel
From: Érico Rolim This functon has inherent safety issues, since a long enough path can lead to memory clobbering. Due to the recursive nature of make_directories(), multiple calls could also stack overflow. Instead, the string can be allocated in the heap. As a bonus, this improves musl compati