Merge branch 'master' into improve-include-consistency

# Conflicts:
#	src/utils.cpp
This commit is contained in:
Axel Kohlmeyer
2019-07-19 17:57:58 -04:00
23 changed files with 346 additions and 185 deletions

View File

@ -5163,8 +5163,8 @@ int VarReader::read_peratom()
for (i = 0; i < nchunk; i++) {
next = strchr(buf,'\n');
*next = '\0';
sscanf(buf,TAGINT_FORMAT " %lg",&tag,&value);
if (tag <= 0 || tag > map_tag_max)
int rv = sscanf(buf,TAGINT_FORMAT " %lg",&tag,&value);
if (tag <= 0 || tag > map_tag_max || rv != 2)
error->one(FLERR,"Invalid atom ID in variable file");
if ((m = atom->map(tag)) >= 0) vstore[m] = value;
buf = next + 1;