Fixed out of boundary write on long lines.
authorTobias Stoeckmann <tobias@stoeckmann.org>
Sun, 2 Apr 2017 11:12:03 +0000 (13:12 +0200)
committerTobias Stoeckmann <tobias@stoeckmann.org>
Sun, 2 Apr 2017 11:12:03 +0000 (13:12 +0200)
commitb1e7c40b2103a4850340044fac685954e76e954b
tree7f11e24097caf9400da4206c24d1a393de223672
parentcceeec0efada64579525b90b30e5597cd24dfc6c
Fixed out of boundary write on long lines.

The terminating nul character ('\0') could be written outside the boundary of
the buffer which is used to read characters. If "sizeof(buffer)" characters
are read, the resulting value must not be used as index, because that's an off
by one.

Read sizeof(buffer)-1 bytes instead.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
slstatus.c