AMBER Archive (2007)

Subject: Re: AMBER: mdfil.f

From: David A. Case (case_at_scripps.edu)
Date: Mon Apr 16 2007 - 12:25:02 CDT


On Mon, Apr 16, 2007, Ross Walker wrote:

> I think it is your compiler here that is busted and not the expression.

Ross: I think you missed the point of the original post.

>
> The expression in question is:
>
> do while ( ie <= iend .and. groupbuffer(ie:ie) /= ' ' )
> ie = ie + 1
> end do

The problem is that when ie=iend+1, the program could try to read
groupbuffer(ie:ie), which is poentially out of bounds of the memory allocated
for the process.

I don't think the original poster actually ever saw a problem, or that anyone
has ever had a problem with this code. It seemed more an opportunity to
complain about Fortran95, which is really off-topic for this list. But it is
good to have people looking carefully at the code, since it is certain that
more important bugs are lurking.

....dac

-----------------------------------------------------------------------
The AMBER Mail Reflector
To post, send mail to amber_at_scripps.edu
To unsubscribe, send "unsubscribe amber" to majordomo_at_scripps.edu