From: Martin H. <ma...@he...> - 2006-09-13 19:39:49
|
Hi Ernst, >> Did I miss something? > > Well, usually that would be correct, but in this case, I'm overwriting an > already NUL-terminated string with new data. strlen will return the length > excluding the NUL char at the end of the original string, so, even in worst > case, that NUL will stay where it is unmodified. Ah, right - I obviously missed the essential part. Thanks for clarifying what should have been obvious (I missed the part that the destination buffer is strlen(thread_argv[0])+1 bytes long, and is already \0 terminated) Martin |