Re: [AMBER] [PATCH 1/8] AmberTools: Fix buffer overflows in mdgx, nab and ptraj

From: David A Case <case.biomaps.rutgers.edu>
Date: Mon, 26 Nov 2012 08:31:36 -0500

On Tue, Oct 23, 2012, Reinis Danne wrote:
>
> diff --git a/AmberTools/src/mdgx/Trajectory.c b/AmberTools/src/mdgx/Trajectory.c
> - char line[128];
> + char line[MAXLINE];

Changed in master branch.

> diff --git a/AmberTools/src/nab/database.c b/AmberTools/src/nab/database.c
> -String sLine;
> +String sLine[MAXDATALINELEN];

Above looks suspicious, and it's not clear (to me, with just a quick look)
how the original code fails. I'm leaving it for the moment, although defining
as a char sline[MAXDATALINELEN]; might work. I' making no changes right now.

> diff --git a/AmberTools/src/ptraj/trajectory.c b/AmberTools/src/ptraj/trajectory.c
> - char buffer[120];
> + char buffer[BUFFER_SIZE];

Changed in master branch.

...thanks for your suggestions....dac


_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Mon Nov 26 2012 - 06:00:04 PST
Custom Search