projects
/
oweals
/
cde.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e45843b
)
ttsession: Coverity (memory corruption, moderate)
author
Jon Trulson
<jon@radscan.com>
Fri, 26 Dec 2014 23:14:35 +0000
(16:14 -0700)
committer
Jon Trulson
<jon@radscan.com>
Fri, 26 Dec 2014 23:14:35 +0000
(16:14 -0700)
cde/lib/tt/bin/ttsession/mp_server.C
patch
|
blob
|
history
diff --git
a/cde/lib/tt/bin/ttsession/mp_server.C
b/cde/lib/tt/bin/ttsession/mp_server.C
index 18b58a86d941c633da48d083002585aa342fbbad..c0ea10c0c9af84de1a17d4c7b5103833468ed359 100644
(file)
--- a/
cde/lib/tt/bin/ttsession/mp_server.C
+++ b/
cde/lib/tt/bin/ttsession/mp_server.C
@@
-890,7
+890,8
@@
sig_handler(int sig)
// session we print out the child session's id.
if ((background_mode) && (forked_pid > 0)) {
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);
}
// this is the signal from the forked