Merge pull request #1108 from akohlmey/fix-sprintf-buffer-overflows

Avoid more buffer overflows due to using snprintf() on fixed size buffers
This commit is contained in:
Axel Kohlmeyer
2018-09-18 16:57:10 -04:00
committed by GitHub
106 changed files with 457 additions and 489 deletions

View File

@ -2540,7 +2540,7 @@ void FixBondReact::open(char *file)
fp = fopen(file,"r");
if (fp == NULL) {
char str[128];
sprintf(str,"Cannot open superimpose file %s",file);
snprintf(str,128,"Cannot open superimpose file %s",file);
error->one(FLERR,str);
}
}