From ba57e8f5363965ebb0a63861914c0a2a97243274 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 27 Mar 2010 22:19:44 +0000 Subject: [PATCH] Sanitize arguments passed to XLookupString git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1108134 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kdecore/kkeyserver_x11.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kdecore/kkeyserver_x11.cpp b/kdecore/kkeyserver_x11.cpp index bda0feb36..3f3bddc0a 100644 --- a/kdecore/kkeyserver_x11.cpp +++ b/kdecore/kkeyserver_x11.cpp @@ -766,7 +766,8 @@ bool codeXToSym( uchar codeX, uint modX, uint& sym ) event.state = modX; event.keycode = codeX; - XLookupString( &event, 0, 0, &keySym, 0 ); + char buffer[64]; + XLookupString( &event, buffer, 63, &keySym, NULL ); sym = (uint) keySym; return true; }