On 12 May 2011 10:07, Jiri Olsa <jolsa(a)redhat.com> wrote:
On Wed, May 11, 2011 at 02:27:42PM +0100, David Gilbert wrote:
> Hi,
> On library functions like strcpy() where there is a destination
> string, latrace -A ends up trying to print out the
> destination buffer which may be completely invalid.
>
yep, it's just taking the pointer and prints it out
> Maybe it's worth doing the same trick that ltrace does, and just
> declare the destination parameters as void*
hm, I wonder we could check on that string and handle bad
characters somehow... display as byte values/finish the output
I guess it might be worth for someone to see what the strcpy
is actually changing
Yes you could use isprint() - but you don't know how big the destination
buffer is and thus you could just seg running off the end of a buffer
that doesn't as yet have a Nil terminator.
Dave