[X2Go-Commits] [nx-libs] 12/19: EncodeBuffer.cpp: add VALGRIND guard

git-admin at x2go.org git-admin at x2go.org
Sat Dec 30 03:35:16 CET 2017


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch 3.6.x
in repository nx-libs.

commit 96879dc69ed4004375bcfbf334e598ea55f19326
Author: Ulrich Sibiller <uli42 at gmx.de>
Date:   Wed Dec 27 15:23:33 2017 +0100

    EncodeBuffer.cpp: add VALGRIND guard
    
    Same as in WriteBuffer.cpp
    
    Valgrind will complain about uninitialized data, but we are only
    writing to the memory here.
---
 nxcomp/src/EncodeBuffer.cpp | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/nxcomp/src/EncodeBuffer.cpp b/nxcomp/src/EncodeBuffer.cpp
index e112113..6e6a30e 100644
--- a/nxcomp/src/EncodeBuffer.cpp
+++ b/nxcomp/src/EncodeBuffer.cpp
@@ -70,6 +70,13 @@ EncodeBuffer::EncodeBuffer()
   initialSize_   = ENCODE_BUFFER_DEFAULT_SIZE;
   thresholdSize_ = ENCODE_BUFFER_DEFAULT_SIZE << 1;
   maximumSize_   = ENCODE_BUFFER_DEFAULT_SIZE << 4;
+
+  #ifdef VALGRIND
+
+  memset(buffer_, '\0', size_);
+
+  #endif
+
 }
 
 EncodeBuffer::~EncodeBuffer()

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git


More information about the x2go-commits mailing list