sal/qa/osl/pipe/osl_Pipe.cxx |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit cdd6aca142495e433d70f85fee2851b60bc0d299
Author: jan iversen <j...@documentfoundation.org>
Date:   Tue Nov 3 08:49:45 2015 +0100

    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 <sberg...@redhat.com>
    Tested-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/sal/qa/osl/pipe/osl_Pipe.cxx b/sal/qa/osl/pipe/osl_Pipe.cxx
index 9f1ae6e..9f04b50 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 );
                 }
             }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to