more fixes for potential buffer overflows by using snprintf() instead of sprintf()

This commit is contained in:
Axel Kohlmeyer
2018-09-06 11:32:44 -04:00
parent 9c27548a5c
commit db510af582
10 changed files with 213 additions and 226 deletions

View File

@ -301,7 +301,7 @@ void PairReaxC::coeff( int nargs, char **args )
Read_Force_Field(fp, &(system->reax_param), control);
else {
char str[128];
sprintf(str,"Cannot open ReaxFF potential file %s",file);
snprintf(str,128,"Cannot open ReaxFF potential file %s",file);
error->all(FLERR,str);
}