Re: Display of some multi-line links is cut off in the middle

Thorsten Glaser <[email protected]>
Newsgroups gmane.comp.web.lynx.devel
Message-ID <[email protected]>
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 :-)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.