Description of problem: If pstack attempts to decode a stack in which a given function signature is more than 256 characters, pstack will segfulat, due to a buffer overrun error in symAddress Version-Release number of selected component (if applicable): How reproducible: Sometimes Steps to Reproduce: 1.create a test program in which function signatures have 256 or more characters 2.run the program in a loop 3.run pstack on the program, and eventually pstack will segfault Actual results: pstack segfaults Expected results: pstack should display as much of each function signature as possible Additional info:
Created attachment 95877 [details] patch to avoid buffer overflows in strcpy This patch replaces the use of strcpy with strncpy and allows callers of symAddress function to specify the length of the passed in buffer. This avoids the possibility of bufferoverflows which lead to the reported SIGSEGV
I have fixed the bug without imposing a length limitation on symbols. Thanks for the report.
An errata has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2003-250.html