Coverity: fix unitialized pointer fields, out of bounds reads ...

Change-Id: Iae0656ffe667692dfb3bebf9bb7913b5872175c6
This commit is contained in:
Émilie Feral
2017-10-24 14:50:44 +02:00
committed by EmilieNumworks
parent c545a23ec6
commit 15610064fa
15 changed files with 23 additions and 12 deletions

View File

@@ -15,7 +15,7 @@ ValuesFunctionParameterController::ValuesFunctionParameterController(char symbol
const char * ValuesFunctionParameterController::title() {
strlcpy(m_pageTitle, I18n::translate(I18n::Message::FunctionColumn), k_maxNumberOfCharsInTitle);
for (int currentChar = 0; currentChar < k_maxNumberOfCharsInTitle; currentChar++) {
for (int currentChar = 0; currentChar < k_maxNumberOfCharsInTitle-1; currentChar++) {
if (m_pageTitle[currentChar] == '(') {
m_pageTitle[currentChar-1] = *m_function->name();
m_pageTitle[currentChar+1] = m_symbol;