Re: [PATCH] readelf: Workaround stringop-truncation error

2021-12-08 Thread Mark Wielaard
On Sat, Dec 04, 2021 at 10:15:04PM +0100, Mark Wielaard wrote: > In function ‘strncpy’, > inlined from ‘print_ehdr’ at readelf.c:1175:4: > error: ‘__builtin_strncpy’ specified bound 512 equals destination size >[-Werror=stringop-truncation] > > strncpy doesn't terminate the copied stri

[PATCH] readelf: Workaround stringop-truncation error

2021-12-04 Thread Mark Wielaard
In function ‘strncpy’, inlined from ‘print_ehdr’ at readelf.c:1175:4: error: ‘__builtin_strncpy’ specified bound 512 equals destination size [-Werror=stringop-truncation] strncpy doesn't terminate the copied string if there is not enough room. We compensate later by explicitly adding a