From 1e3c6645d3cf547c841163c254fe8260e5250964 Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Wed, 8 Dec 2010 14:42:16 +0000 Subject: [PATCH] [Bugfix] Fix "off-by-one" sprintf error in CConn::showMsgBox() function. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4219 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- unix/vncviewer/CConn.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unix/vncviewer/CConn.cxx b/unix/vncviewer/CConn.cxx index 8a647870..7983cdfc 100644 --- a/unix/vncviewer/CConn.cxx +++ b/unix/vncviewer/CConn.cxx @@ -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); -- 2.39.5