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

Thomas Dickey <[email protected]>
Newsgroups gmane.comp.web.lynx.devel
Message-ID <[email protected]>
On Fri, Dec 31, 2021 at 12:23:43PM +0900, KIHARA Hideto wrote:
> * Problem:
> In lynx2.9.0dev.10, display of some multi-line links is cut off in the middle.
> lynx2.9.0dev.9 does not have the problem.
> 
> * Actual Result:
> lynx https://lists.nongnu.org/archive/html/lynx-dev/2021-10/threads.html
> 
> >     * [13][Lynx-dev] Build failures on hppa architectures after update
> >       fr
> 
> * Expected Result:
> >     * [13][Lynx-dev] Build failures on hppa architectures after update
> >       from 2.9.0dev.9 to 2.9.0dev.10, Axel Beckert, 2021/10/30
> 
> * Fix:
> Reverting following change solves the problem.
> --- lynx2.9.0dev.9/src/GridText.c	2021-06-30 07:01:12.000000000 +0900
> +++ lynx2.9.0dev.10/src/GridText.c	2021-10-25 01:13:59.000000000 +0900
> @@ -3006,7 +3005,7 @@
>  	    ctrl_chars_on_this_line += utfxtra_on_this_line;
>  
>  	    /* Add the data to the new line. -FM */
> -	    strcat(linedata, p);
> +	    for (i = 0; (linedata[i] = p[i]) != '\0'; ++i) ;
>  	    line->size = (unsigned short) (line->size + plen);
>  	}
>      }

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

If you have a test-file which shows the difference, I can probably make
a better fix.

-- 
Thomas E. Dickey <[email protected]>
https://invisible-island.net
ftp://ftp.invisible-island.net
signature.asc (application/pgp-signature, 659 B)
-----BEGIN PGP SIGNATURE-----

iQGzBAABCgAdFiEEGYgtkt2kxADCLA1WzCr0RyFnvgMFAmHPqAcACgkQzCr0RyFn
vgPsFAwAh8XzoLmLB2xbrbRR4xIhlmTp+T120qqKViAx/vB695/RM8mM0J03qzjG
NAF4g+NuCehs9Lsslmu944YFUOLQLGA8BtpFvr1g7IIuGch5XagBo6uWafpyME9Q
yS7/B15S455nND5FeGQWRErab5loqDfoKvN1/2sR4cWNVEU+xy0lvlD5dtf24mmc
39VsAFnC7vqUWBn5usFwKY3ZQ01xpRSym/9dis1z2pRPYRuJhdBFl0C2zJlWpVQO
qiIWEHWSBqVVddpa9NoilIkyPAzsFgm1wPeg0xYNgDo5+x8s7Q5fXp7rYhmLAU6M
L2XZU5DtfoGz6dKpW1lEa71Pv3l7Re660GmZyJG493y4ahhQVqUeG6JXmDtWLpAJ
ZQU1r2rFoeft0dnMIJjT3cELiyF41klb9vFurbaeG8I/xADltnNP8W9wjWpXl5CQ
BTyLnmV2XJT6nDFr8SLOYx+HXkAwcn1dNrVT9m6USEgcd8Yco24ZgbImIdUNtCv3
7OoiqHdj
=Id+j
-----END PGP SIGNATURE-----
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.