Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Apr 2007 18:46:27 +0400
From:      Stanislav Sedov <stas@FreeBSD.org>
To:        Stanislav Sedov <stas@FreeBSD.org>
Cc:        cvs-src@FreeBSD.org, pav@FreeBSD.org, cvs-all@FreeBSD.org, "Simon L. Nielsen" <simon@FreeBSD.org>, src-committers@FreeBSD.org
Subject:   Re: cvs commit: src/contrib/top top.X top.c top.h src/usr.bin/top machine.c
Message-ID:  <20070414184627.746fa559.stas@FreeBSD.org>
In-Reply-To: <20070414181730.eca262c0.stas@FreeBSD.org>
References:  <200704141016.l3EAGqIs023798@repoman.freebsd.org> <1176546388.54822.11.camel@ikaros.oook.cz> <1176546959.54822.14.camel@ikaros.oook.cz> <20070414154246.89ad2946.stas@FreeBSD.org> <20070414124654.GB1687@zaphod.nitro.dk> <20070414181730.eca262c0.stas@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--Signature=_Sat__14_Apr_2007_18_46_27_+0400_UJ4gfRinSpSVmy9e
Content-Type: text/plain; charset=US-ASCII
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

On Sat, 14 Apr 2007 18:17:30 +0400
Stanislav Sedov <stas@FreeBSD.org> mentioned:

> Well, not quite right. If you screen is wider then 128 symbols, there
> could be an overflow, since the row buffer is 128 bytes length.
>
> I have not touched any limits, just replaced the string it displays. So
> there can be overflow with patch or without it, if both the command
> name and screen width is wider then 128.
>

That's even better. In contrib src display.c it always NULL-terminate
string at the screen_width point, so it's always write '\0' to the
unknown area if screen_width is larger than 128. Hopefully, the storage
is allocated last in .data section, so it doesn't overwrite any
important data and code.

--
Stanislav Sedov
ST4096-RIPE

--Signature=_Sat__14_Apr_2007_18_46_27_+0400_UJ4gfRinSpSVmy9e
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (FreeBSD)

iD8DBQFGIOlDK/VZk+smlYERAhzhAJ94yecJV3nbgsIhmCDMo/hmQDWJ3ACeNXhr
m+xJX8Vfwz5W7zD2pnXT4eQ=
=DMO0
-----END PGP SIGNATURE-----

--Signature=_Sat__14_Apr_2007_18_46_27_+0400_UJ4gfRinSpSVmy9e--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070414184627.746fa559.stas>