]> source.dussan.org Git - tigervnc.git/commitdiff
[Bugfix] Fix "off-by-one" sprintf error in CConn::showMsgBox() function.
authorAdam Tkac <atkac@redhat.com>
Wed, 8 Dec 2010 14:42:16 +0000 (14:42 +0000)
committerAdam Tkac <atkac@redhat.com>
Wed, 8 Dec 2010 14:42:16 +0000 (14:42 +0000)
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4219 3789f03b-4d11-0410-bbf8-ca57d06f2519

unix/vncviewer/CConn.cxx

index 8a647870fa9685c2db796fe7209de4d115921b5c..7983cdfc2f7a9a4e154ec1a9671a6716b3117f35 100644 (file)
@@ -130,7 +130,7 @@ CConn::~CConn() {
 
 bool CConn::showMsgBox(int flags, const char* title, const char* text)
 {
-  CharArray titleText(strlen(title) + 12);
+  CharArray titleText(12 + strlen(title) + 1);
   sprintf(titleText.buf, "VNC Viewer: %s", title);
 
   TXMsgBox msgBox(dpy,text,flags,titleText.buf);