summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorjan iversen <jani@documentfoundation.org>2015-11-03 08:49:45 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-11-03 08:03:41 +0000
commitcdd6aca142495e433d70f85fee2851b60bc0d299 (patch)
tree9491020401a2476fc584a7c765ce5f91fc1946d0 /sal
parent84eeebd75010a6263fc6aba0ebc16014013a3410 (diff)
Solved CID 1338058 and CID 1338057
terminated buf correctly before calling printf. This should be done automatically but coverity does not see it. Change-Id: I0bcf8486b27dbfa9f7c49b338bbf483029b523cb Reviewed-on: https://gerrit.libreoffice.org/19751 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sal')
-rw-r--r--sal/qa/osl/pipe/osl_Pipe.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/sal/qa/osl/pipe/osl_Pipe.cxx b/sal/qa/osl/pipe/osl_Pipe.cxx
index 9f1ae6e3db4b..9f04b503014f 100644
--- a/sal/qa/osl/pipe/osl_Pipe.cxx
+++ b/sal/qa/osl/pipe/osl_Pipe.cxx
@@ -766,6 +766,7 @@ namespace osl_StreamPipe
printf("read failed! \n");
return;
}
+ buf[sizeof(buf)-1] = '\0';
printf("buffer is %s \n", buf);
printf("send\n");
nChars = aSenderPipe.send( m_pTestString2.getStr(), m_pTestString2.getLength() + 1 );
@@ -829,6 +830,7 @@ namespace osl_StreamPipe
printf("server receive failed! \n");
return;
}
+ buf[sizeof(buf)-1] = '\0';
printf("received message is: %s\n", buf );
}
}