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
avoid potential segfault when fed nonsense
[simgrid.git]
/
src
/
smpi
/
bindings
/
smpi_pmpi.cpp
diff --git
a/src/smpi/bindings/smpi_pmpi.cpp
b/src/smpi/bindings/smpi_pmpi.cpp
index
43cbdb8
..
6b831d5
100644
(file)
--- a/
src/smpi/bindings/smpi_pmpi.cpp
+++ b/
src/smpi/bindings/smpi_pmpi.cpp
@@
-215,7
+215,7
@@
int PMPI_Error_class(int errorcode, int* errorclass) {
}
int PMPI_Error_string(int errorcode, char* string, int* resultlen){
}
int PMPI_Error_string(int errorcode, char* string, int* resultlen){
- if (errorcode<0 || string ==nullptr){
+ if (errorcode<0 ||
errorcode>= MPI_MAX_ERROR_STRING ||
string ==nullptr){
return MPI_ERR_ARG;
} else {
static const char *smpi_error_string[] = {
return MPI_ERR_ARG;
} else {
static const char *smpi_error_string[] = {