summaryrefslogtreecommitdiffstats
path: root/common/rfb
diff options
context:
space:
mode:
authorJan Grulich <jgrulich@redhat.com>2018-10-01 10:17:20 +0200
committerJan Grulich <jgrulich@redhat.com>2018-10-03 09:59:41 +0200
commita752d8fd7a0622e11dda72f690d4fea8cb913178 (patch)
tree8f09d925d2781234b530db029ae36359fa92a500 /common/rfb
parent20041a2924eb19470e1780c6c07ed594f3f9f614 (diff)
downloadtigervnc-a752d8fd7a0622e11dda72f690d4fea8cb913178.tar.gz
tigervnc-a752d8fd7a0622e11dda72f690d4fea8cb913178.zip
Avoid potential crash when replacing buffer in PlainPasswd
Diffstat (limited to 'common/rfb')
-rw-r--r--common/rfb/util.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/rfb/util.h b/common/rfb/util.h
index b678b890..9e59bd37 100644
--- a/common/rfb/util.h
+++ b/common/rfb/util.h
@@ -50,7 +50,7 @@ namespace rfb {
CharArray() : buf(0) {}
CharArray(char* str) : buf(str) {} // note: assumes ownership
CharArray(int len) {
- buf = new char[len];
+ buf = new char[len]();
}
~CharArray() {
delete [] buf;