Re: [LTP] Buffer Overflow with ftest03 and ftest07

Cyril Hrubis
2010-03-25T18:18:04Z

Hi!
> After that I tested them. Both ftest03.c and ftest07.c passes when run from
> the command line. But when executed by runltp, they fail with return code
> 11. This is identical to the behavior without your patch.

Well, they PASS every time when executed by hand, because TDIRECTORY defaults
to plain "/tmp/" in this case. When executing tests with runltp TDIRECTORY is
se to something like "/tmp/ltp-qnZVs21494/" and then fuss[] is sometimes not
big enough to hold the string and this causes the segfault. Try for yourself:

TDIRECTORY="/tmp/this_name_is_just_too_long" ./ftest03

However deleting the code that creates temporary directories works for me, at
least for ftest03.c. I'll test Jiri's patch asap and try to fix the remaining
corner cases.

--
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.