[X2Go-Commits] [nx-libs] 18/19: EncodeBuffer.cpp: add another VALGRIND guard
git-admin at x2go.org
git-admin at x2go.org
Sat Dec 30 03:35:17 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 367bec59524ffc3d005ae8908c5edf42e9b01ca7
Author: Ulrich Sibiller <uli42 at gmx.de>
Date: Fri Dec 29 14:25:53 2017 +0100
EncodeBuffer.cpp: add another VALGRIND guard
Fixes ArcticaProject/nx-libs#572
---
nxcomp/src/EncodeBuffer.cpp | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/nxcomp/src/EncodeBuffer.cpp b/nxcomp/src/EncodeBuffer.cpp
index 6e6a30e..e6af38b 100644
--- a/nxcomp/src/EncodeBuffer.cpp
+++ b/nxcomp/src/EncodeBuffer.cpp
@@ -108,7 +108,15 @@ void EncodeBuffer::fullReset()
size_ = initialSize_;
buffer_ = new unsigned char[size_ + ENCODE_BUFFER_PREFIX_SIZE +
- ENCODE_BUFFER_POSTFIX_SIZE] + ENCODE_BUFFER_PREFIX_SIZE;
+ ENCODE_BUFFER_POSTFIX_SIZE];
+
+ #ifdef VALGRIND
+
+ memset(buffer_, '\0', size_ + ENCODE_BUFFER_PREFIX_SIZE + ENCODE_BUFFER_POSTFIX_SIZE);
+
+ #endif
+
+ buffer_ += ENCODE_BUFFER_PREFIX_SIZE;
}
end_ = buffer_ + size_;
--
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