Jens Lattig wrote:
>
> ==============================================================
> cd antechamber/c60 && ./Run.c60
> *** stack smashing detected ***: ../../../exe/antechamber terminated
> ======= Backtrace: =========
> /lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x48)[0x40142138]
> /lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x0)[0x401420f0]
> ../../../exe/antechamber[0x806faf6]
In the rjcrt() function, ($AMBERHOME/src/antechamber/jcrt.c), the array
defined at
char tmpchar[10];
is too small to hold the line "basis=6-31G*" when reading in the
buckyball.jcrt file, hence the end of this array is overwritten. This is
generally a "bad thing", since it may be possible to pervert the normal
flow of a program and get it to do things that it should not. This can
be fixed in one of two ways:
a) Increasing the tmpchar array size:
char tmpchar[15]
or
b) Telling sscanf() exactly how many characters it can accept; if
tmpchar[10], then sscanf should be:
sscanf(line, "%9s", tmpchar);
The one character difference is to account for the terminating null byte
in the array.
I think a combination of these both would be a good idea, since only
applying a) means that a longer user supplied line could crash
antechamber and only applying b) means that the basis string would be
truncated at 6-31 instead of the whole 6-31G*.
regards,
Mark
-----------------------------------------------------------------------
The AMBER Mail Reflector
To post, send mail to amber.scripps.edu
To unsubscribe, send "unsubscribe amber" (in the *body* of the email)
to majordomo.scripps.edu
Received on Sun Jun 15 2008 - 06:08:10 PDT