A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
use strncpy instead of strcpy to please sonar
[simgrid.git]
/
src
/
smpi
/
internals
/
smpi_global.cpp
diff --git
a/src/smpi/internals/smpi_global.cpp
b/src/smpi/internals/smpi_global.cpp
index
4aea1a5
..
be68fe1
100644
(file)
--- a/
src/smpi/internals/smpi_global.cpp
+++ b/
src/smpi/internals/smpi_global.cpp
@@
-563,7
+563,7
@@
static void smpi_init_privatization_dlopen(const std::string& executable)
void* libhandle = dlopen(libname.c_str(), RTLD_LAZY);
// get library name from path
char fullpath[512] = {'\0'};
void* libhandle = dlopen(libname.c_str(), RTLD_LAZY);
// get library name from path
char fullpath[512] = {'\0'};
- str
cpy(fullpath, libname.c_str()
);
+ str
ncpy(fullpath, libname.c_str(), 511
);
#if not defined(__APPLE__)
int ret = dl_iterate_phdr(visit_libs, fullpath);
if (ret == 0)
#if not defined(__APPLE__)
int ret = dl_iterate_phdr(visit_libs, fullpath);
if (ret == 0)