]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix more AddressSanitizer violations in usr.bin/top
authordim <dim@FreeBSD.org>
Wed, 20 Feb 2019 20:17:54 +0000 (20:17 +0000)
committerdim <dim@FreeBSD.org>
Wed, 20 Feb 2019 20:17:54 +0000 (20:17 +0000)
commit77fead5b8a6f30024abe73e4857f8c95f81d7e02
tree7b4c536b04bf454aeeef07cd6689e0b69c5b321c
parent7354c4db663a9cba79053a06a33487ce98fb4939
Fix more AddressSanitizer violations in usr.bin/top

In line_update(), set lastcol correctly after moving to any non-zero
column, so the "overwrite old stuff" part does not attempt to address
negative offsets in the current line.

Rewrite setup_buffer() to always allocate at least 80 characters,
otherwise various calls to summary_format() will overwrite the end of
the buffers, if the screen width gets small enough.

MFC after: 1 week
usr.bin/top/display.c