Talk:Strcat

From Wikipedia, the free encyclopedia

[edit] Suggestions

It might be better to create an article seperate for strncat because it has its own issues...on the other hand it may be better to move all the libc string routines into one article as this is common practice with man pages on this topic --Michael Lynn 01:11, 2 November 2006 (UTC)

in the section talking about security problems with strcat, it is not always accurate to call the resulting exception a segmentation fault, on most systems it is a page fault, but on some (those with little or no mmu) it results in no fault at all mearly a corruption of memory, perhaps this should be changed to something a little less specific. --Michael Lynn 01:22, 2 November 2006 (UTC)

[edit] Corrections

I fixed an incorrect statement here regarding the safety of strncat...the problem here is that strncat will write a terminating null one byte past the end of the max length if the input data reaches max length, so if you have a buffer char c[128] as your destination buffer, and you supply the max length of sizeof(c) then you have written a potencially exploitable off by one overflow...see off by one error for more details --Michael Lynn 00:27, 2 November 2006 (UTC)

[edit] Header File

I added that strcat is found in the 'string.h' header file. stemperm 20:33, 12 February 2007 (UTC)