Project

General

Profile

Bug #791

pdb2gmx race condition

Added by Peter Kasson about 8 years ago. Updated about 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
preprocessing (pdb2gmx,grompp)
Target version:
Affected version - extra info:
4-5-patches
Affected version:
Difficulty:
uncategorized
Close

Description

If atomtypes.atp ends in a blank line, the following loop in resall.c becomes infinite. It is called by pdb2gmx.

while(!feof(in))
        {
/* Skip blank or comment-only lines */
do {
fgets2(buf,STRLEN,in);
if (NULL != buf) {
strip_comment(buf);
trim(buf);
}
}
while (NULL!=buf && strlen(buf)==0);
if ((buf != NULL) && (sscanf(buf,"%s%lf",name,&m) == 2))
            {
a->m = m;
add_atomtype(at,tab,a,name,nb, 0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 );
fprintf(stderr,"\rAtomtype %d",nratt+1);
}
}

Associated revisions

Revision 4bc6a0f2 (diff)
Added by Berk Hess about 8 years ago

fixed possible infinite loop when reading atom types, fixes #791

Change-Id: If5ddcc0b5238cdfa625b1d85d05e1dabbe4eb32a

Revision 6e998b8d
Added by Roland Schulz about 8 years ago

Merge "fixed possible infinite loop when reading atom types, fixes #791" into release-4-5-patches

History

#1 Updated by Berk Hess about 8 years ago

  • Status changed from New to Closed
  • Target version changed from 4.5.4 to 4.5.5

I fixed this for 4.5.5.

Also available in: Atom PDF