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

Mouse <[email protected]>
Newsgroups gmane.comp.web.lynx.devel
Message-ID <[email protected]>
>> -	    strcat(linedata, p);
>> +	    for (i = 0; (linedata[i] = p[i]) != '\0'; ++i) ;

> asan2 reported that this line had a strcpy whose source/destination
> overlapped.

Then asan2 is wrong; the original line (the - line above) does not have
any strcpy at all.  It has a strcat.  (Perhaps the strcat source and
destination overlap, and asan2 is wrong only in that it reports the
wrong call in its complaint?)  But the replacement code (the + line
above) implements (loosely put) strcpy, not strcat.  Perhaps it would
work better to replace the strcat with code that actually concatenates,
preserving the presumably-intended semantics?

Maybe something like (completely untested)

	for (i=0,j=strlen(linedata);(linedata[j]=p[i]);i++,j++) ;

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
 X  Against HTML		[email protected]
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B
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.