mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-15 04:32:24 +00:00
ttsession: Coverity (memory corruption, moderate)
This commit is contained in:
parent
e45843bc95
commit
ce7bdf9f62
1 changed files with 2 additions and 1 deletions
|
@ -890,7 +890,8 @@ sig_handler(int sig)
|
||||||
// session we print out the child session's id.
|
// session we print out the child session's id.
|
||||||
if ((background_mode) && (forked_pid > 0)) {
|
if ((background_mode) && (forked_pid > 0)) {
|
||||||
if (print_sessid) {
|
if (print_sessid) {
|
||||||
read(ds_fds[0], session_buf, 255);
|
memset(session_buf, 0, 255);
|
||||||
|
read(ds_fds[0], session_buf, 255 - 1);
|
||||||
printf("%s", session_buf);
|
printf("%s", session_buf);
|
||||||
}
|
}
|
||||||
// this is the signal from the forked
|
// this is the signal from the forked
|
||||||
|
|
Loading…
Reference in a new issue