mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 00:41:17 +02:00
src/gui/user_menue_setup.cpp fix possible AddressSanitizer: global-buffer-overflow
This commit is contained in:
@@ -190,6 +190,10 @@ int CUserMenuSetup::exec(CMenuTarget* parent, const std::string &actionKey)
|
|||||||
static neutrino_locale_t locals[SNeutrinoSettings::ITEM_MAX];
|
static neutrino_locale_t locals[SNeutrinoSettings::ITEM_MAX];
|
||||||
neutrino_locale_t CUserMenuSetup::getLocale(unsigned int key)
|
neutrino_locale_t CUserMenuSetup::getLocale(unsigned int key)
|
||||||
{
|
{
|
||||||
|
if(key >= SNeutrinoSettings::ITEM_MAX){
|
||||||
|
key = SNeutrinoSettings::ITEM_MAX-1;
|
||||||
|
}
|
||||||
|
|
||||||
static bool initialized = false;
|
static bool initialized = false;
|
||||||
if (!initialized) {
|
if (!initialized) {
|
||||||
initialized = true;
|
initialized = true;
|
||||||
|
Reference in New Issue
Block a user