nhorman / dropwatch

user space utility to interface to kernel dropwatch facility
GNU General Public License v2.0
632 stars 92 forks source link

Fix compilation error with gcc 11 #43

Closed idosch closed 3 years ago

idosch commented 3 years ago

Fix following compilation error:

lookup_bfd.c: In function ‘lookup_bfd_init’: lookup_bfd.c:39:54: error: ‘sprintf’ may write a terminating nul past the end of the destination [-Werror=format-overflow=] 39 | sprintf(dbibuf,"/usr/lib/debug/lib/modules/%s", uts.release); | ^ lookup_bfd.c:39:9: note: ‘sprintf’ output between 28 and 287 bytes into a destination of size 286 39 | sprintf(dbibuf,"/usr/lib/debug/lib/modules/%s", uts.release); | ^~~~~~~~~~~~~~~~

Signed-off-by: Ido Schimmel idosch@nvidia.com