jtamate created this revision.
jtamate added a reviewer: Frameworks.
Restricted Application added a project: Frameworks.
jtamate requested review of this revision.

REVISION SUMMARY
  Initialize the arrays to the maximum size of the enums and use c++11 
initialization to ensure that all values are set to zero (or equivalent).

TEST PLAN
  execute kdialog --getexistingdirectory smb://
  
  before the patch, the following messages from gcc asan are displayed:
  
  kdesrc/frameworks/kiconthemes/src/kiconeffect.cpp:170:51: runtime error: 
index 3 out of bounds for type 'int [3]'
  kdesrc/frameworks/kiconthemes/src/kiconeffect.cpp:172:51: runtime error: 
index 3 out of bounds for type 'float [3]'
  kdesrc/frameworks/kiconthemes/src/kiconeffect.cpp:174:40: runtime error: 
index 3 out of bounds for type 'bool [3]'
  kdesrc/frameworks/kiconthemes/src/kiconeffect.cpp:176:35: runtime error: 
index 3 out of bounds for type 'int [3]'
  kdesrc/frameworks/kiconthemes/src/kiconeffect.cpp:176:74: runtime error: 
index 3 out of bounds for type 'int [3]'
  kdesrc/frameworks/kiconthemes/src/kiconeffect.cpp:180:35: runtime error: 
index 3 out of bounds for type 'int [3]'
  
  This runtime error is not shown any more.

REPOSITORY
  R302 KIconThemes

REVISION DETAIL
  https://phabricator.kde.org/D11132

AFFECTED FILES
  src/kiconeffect.cpp

To: jtamate, #frameworks
Cc: michaelh

Reply via email to