mirror of https://github.com/encounter/SDL.git
Fix read of uninitialised variable
If the condition (dbus->message_iter_get_arg_type(&sub) == DBUS_TYPE_STRING) is false, subtext is not initialised.
This commit is contained in:
parent
d51a8f530e
commit
00b95e989b
|
@ -105,6 +105,7 @@ Fcitx_GetPreeditString(SDL_DBusContext *dbus,
|
|||
dbus->message_iter_recurse(&iter, &array);
|
||||
while (dbus->message_iter_get_arg_type(&array) == DBUS_TYPE_STRUCT) {
|
||||
dbus->message_iter_recurse(&array, &sub);
|
||||
subtext = NULL;
|
||||
if (dbus->message_iter_get_arg_type(&sub) == DBUS_TYPE_STRING) {
|
||||
dbus->message_iter_get_basic(&sub, &subtext);
|
||||
if (subtext && *subtext) {
|
||||
|
|
Loading…
Reference in New Issue