News for hackers. Stuff that matters.
Re:Massacring C Pointers by caf on Tuesday June 26, 2018 @02:48AM (#17398420)
You can avoid the need for setting the null terminator explicitly by using memcpy(str + slen, t, tlen + 1) as the second memcpy.
Re:Massacring C Pointers by jmts on Tuesday June 26, 2018 @02:58AM (#17398452)
And this is why we have code review ;)