From: Tobias Stoeckmann Date: Sun, 2 Apr 2017 11:12:03 +0000 (+0200) Subject: Fixed out of boundary write on long lines. X-Git-Url: https://git.xinqibao.xyz/slstatus.git/commitdiff_plain/b1e7c40b2103a4850340044fac685954e76e954b?ds=sidebyside;hp=b1e7c40b2103a4850340044fac685954e76e954b 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 ---