1.1 --- a/agent/src/os/bsd/libproc_impl.c Mon Sep 23 20:26:18 2019 +0200 1.2 +++ b/agent/src/os/bsd/libproc_impl.c Fri Apr 03 14:14:26 2020 +0100 1.3 @@ -215,7 +215,12 @@ 1.4 return NULL; 1.5 } 1.6 1.7 - strncpy(newlib->name, libname, sizeof(newlib->name)); 1.8 + if (strlen(libname) >= sizeof(newlib->name)) { 1.9 + print_debug("libname %s too long\n", libname); 1.10 + return NULL; 1.11 + } 1.12 + strcpy(newlib->name, libname); 1.13 + 1.14 newlib->base = base; 1.15 1.16 if (fd == -1) {