Buffer overflow

Hi,

I had my analysis program working in ROOT 5.18, but recently the computers at the lab were changed to ubuntu lucid lynx and the compilers are g++ 4.x. I had been using g++ 3.3 before. Now we have ROOT 5.26. And I upgraded my program to work with ROOT 5.26. It compiles, but keeps giving the following runtime error.

*** buffer overflow detected ***: /projects/06035/ROOT/root5.26/root/bin/root.exe terminated
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x50)[0x1440390]
/lib/tls/i686/cmov/libc.so.6(+0xe12ca)[0x143f2ca]
/lib/tls/i686/cmov/libc.so.6(+0xe0a08)[0x143ea08]
/lib/tls/i686/cmov/libc.so.6(_IO_default_xsputn+0x9e)[0x13c7afe]
/lib/tls/i686/cmov/libc.so.6(_IO_vfprintf+0x368a)[0x139e29a]
/lib/tls/i686/cmov/libc.so.6(__vsprintf_chk+0xad)[0x143eabd]
/lib/tls/i686/cmov/libc.so.6(__sprintf_chk+0x2d)[0x143e9fd]
/projects/06035/ROOT/lib/libTExperiment.so(_ZN11TExperiment14ConvertEvtFileEPcS0_PKc+0x11e7)[0x24c7d2b]

Here is the gdb backtrace:
#0 0x0012d422 in __kernel_vsyscall ()
#1 0x004527d3 in waitpid () from /lib/tls/i686/cmov/libc.so.6
#2 0x0804a427 in WaitChild (childpid=11160) at rootx/src/rootx.cxx:325
#3 0x0804ab45 in main (argc=1, argv=0xbffff024) at rootx/src/rootx.cxx:460

How can I solve this problem?

Thanks

Looks like the error is in:

$ echo _ZN11TExperiment14ConvertEvtFileEPcS0_PKc | c++filt
TExperiment::ConvertEvtFile(char*, char*, char const*)

can you check for the usage of sprintf in there, where you likely go out of the space assigned to the buffer. Best to change to snprintf.

Cheers, Fons.