cvs commit: src/contrib/top top.X top.c top.h src/usr.bin/top machine.c

Stanislav Sedov stas at FreeBSD.org
Sat Apr 14 14:47:08 UTC 2007


On Sat, 14 Apr 2007 18:17:30 +0400
Stanislav Sedov <stas at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/cvs-src/attachments/20070414/5bf99cd8/attachment.pgp


More information about the cvs-src mailing list