Return value of a function 'vconf_get_str' is dereferenced at e_mod_main.c:157 without checking, but it is usually checked for this function.
Change-Id: Iaf5ac8527bbf8d399c37597f10674cfceeb6e031
/* Just in case we did not find any matching language string */
g_keymap_index = 0;
- for (loop = 0; loop < sizeof(g_keymap_info) / sizeof(struct _E_Input_Method_Keymap_Info); loop++)
+ if (language)
{
- if (strncmp(language, g_keymap_info[loop].language, strlen(g_keymap_info[loop].language)) == 0)
+ for (loop = 0; loop < sizeof(g_keymap_info) / sizeof(struct _E_Input_Method_Keymap_Info); loop++)
{
- g_keymap_index = loop;
+ if (strncmp(language, g_keymap_info[loop].language, strlen(g_keymap_info[loop].language)) == 0)
+ {
+ g_keymap_index = loop;
+ }
}
}
/* We do not want to change the current keymap related behavior in TV profile for now */