From 609d29bdd85f4e9cad7a10a9808c246a9a8ddd81 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Wed, 14 Nov 2012 21:33:15 +0100 Subject: [PATCH] stringinput: avoid uninitialized access --- src/gui/widget/stringinput.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/widget/stringinput.cpp b/src/gui/widget/stringinput.cpp index 1579b0dba..5e4a6d99a 100644 --- a/src/gui/widget/stringinput.cpp +++ b/src/gui/widget/stringinput.cpp @@ -421,7 +421,7 @@ int CStringInput::exec( CMenuTarget* parent, const std::string & ) return res; } oldval[size] = 0; - dispval[size] = 0; + memset(dispval, 0, size + 1); if (parent) parent->hide();