HomeFreeBSD

Fix more AddressSanitizer violations in usr.bin/top

Description

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

Details

Provenance
dimAuthored on
Parents
rS344380: Correct gmock/gtest expectations w.r.t. C++11/RTTI
Branches
Unknown
Tags
Unknown