On Mon, Aug 16, 2010 at 2:13 PM, Henry Yei <[email protected]> wrote:
> This patch modifies all tests in the ftest directory to  use
> MAXPATHLEN on all character arrays that store path/file names rather
> than arbitrarily sized arrays. This corrects issues where there was
> truncation happening when copying a path from one array to another if
> the path was long enough. The ftest code may delete the tmp directory
> instead of the tmp file due to truncation, and cause LTP to report a
> failure/warning when the tmp directory disappears. We saw this in
> ftest03,07 where it was trying to copy wdbuf[MAXPATHLEN] into fuss[40]
> here:
>
>    sprintf(fuss, "%s/ftest03.%d", getcwd(wdbuf, sizeof( wdbuf)), getpid());
>
> and then attempting to delete the file but instead got the directory here:
>
>    execl("/bin/rm", "rm", "-rf", fuss, NULL);

ACK.

------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to