Xinqi Bao's Git
projects
/
slstatus.git
/ commitdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
patch
| inline |
side by side
(from:
b1e7c40
)
Fixed out of boundary write on long lines.
author
Tobias Stoeckmann <
[email protected]
>
Sun, 2 Apr 2017 11:12:03 +0000
(13:12 +0200)
committer
Tobias Stoeckmann <
[email protected]
>
Sun, 2 Apr 2017 11:12:03 +0000
(13:12 +0200)
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 <
[email protected]
>
No differences found