On Fri, Jul 11, 2008 at 04:10:25PM +0530, Subrata Modak wrote:
> 
> Thanks Jeff for testing them out. I also did a thorough testing. Thanks
> Matt for providing those patches. Here are my observations below:
> 

Thanks for applying them.

I've attached another patch that I forgot to send last time.

This patch uses strcpy() instead of strcat(). strcat() should only be
used when the 'dest' argument is NULL terminated. In this case,
path_buffer is not initialised and so may not contain a NULL character.
strcpy() will do the right thing and copy the string to the beginning of
path_buffer.
--- ltp-full-20080531/testcases/kernel/syscalls/readlink/readlink04.c.orig      
2008-06-18 16:23:41.000000000 +0100
+++ ltp-full-20080531/testcases/kernel/syscalls/readlink/readlink04.c   
2008-06-18 16:23:21.000000000 +0100
@@ -224,7 +224,7 @@
        }
 
        /* create the full pathname of the executable to be execvp'ed */
-       strcat((char *)path_buffer, (char *)bin_dir);
+       strcpy((char *)path_buffer, (char *)bin_dir);
        strcat((char *)path_buffer, (char *)creat_slink);
 
 
-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to