Talk:Strcat

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)

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  as your destination buffer, and you supply the max length of   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)

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

free In Example?
the strcpy article includes a free function call but this one doesn't, is it unnecessary/bad to use that with memory occupied by a strcat? I just thought id ask cause i noticed my test program segfaults when i try to free a strcat. —Preceding unsigned comment added by 119.224.40.127 (talk) 21:06, 29 April 2009 (UTC)


 * You can only use free with memory allocated with malloc. It does not matter what calls are done that write to that memory. The strcpy example is using malloc in an attempt to clarify why strcpy is different than assignment.Spitzak (talk) 21:23, 11 January 2010 (UTC)

Manual pages
Somebody is trying to post the manual page for strcat_s.

Although it is mildly interesting about the order of the arguments and return type, there is no need for this complexity. This is far more text than is used to describe strcat itself! I tried to partially remedy by adding a bit of info for the other calls and stripping this down to a smaller size.

Please post a LINK to the manual page, not the text!Spitzak (talk) 21:00, 1 October 2011 (UTC)

Okay, the manual page has been re-inserted, despite the fact that it is incredibly redundant and he did not remove the IDENTICAL text I put in there beforehand. Comments, please? I do not like this and would like to remove it.Spitzak (talk) 17:58, 3 October 2011 (UTC)