KIHARA Hideto dixit:

>Reverting following change solves the problem.

>-          strcat(linedata, p);
>+          for (i = 0; (linedata[i] = p[i]) != '\0'; ++i) ;

The lower line is a strcpy inlined, not a strcat, so probably a
bogus refactor…

(that being said, I’d prefer if new code used either strlcat, if
the lengths are unknown/unchecked (but linedata is NUL-terminated
before the call) or memcpy (if the lengths are known, e.g. because
the target was allocated at the right size))

Meow,
//mirabilos
-- 
15:41⎜<Lo-lan-do:#fusionforge> Somebody write a testsuite for helloworld :-)

Reply via email to