[AMBER] antechamber: prepgen mainchain file character limit

From: Markus Schneider <markusg.schneider.wzw.tum.de>
Date: Thu, 30 Nov 2017 16:36:02 +0100

Hi all,

when using prepgen, I found that segfaults and crashes occured for
certain choices of mainchain files (-m inputs). In fact, prepgen
reproducibly crashes for me whenever the mainchain path exceeds 32
characters. The same setup runs fine for shorter file names. Other input
files could have longer file names and not make a problem. I guess the
offending line is found in prepgen.c:

char mcfilename[30] = "MAINCHAIN.DAT";

All other arrays which contain file names are initialized like

char mc_filename[MAXCHAR];

where MAXCHAR is defined as 2048.

I suspect increasing the size of the mcfilename array to MAXCHAR would
get rid of the crashes and save some time for others who run into the
same issue. It would be great if someone could take a look at this.
Version used was AmberTools16.

Kind regards,

Markus


_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Thu Nov 30 2017 - 08:00:02 PST
Custom Search