Somehow a user was running into a case where plymouthd
would busy loop taking 100% cpu. gdb revealed that it
was stuck trying to process keyboard input. This is
apparently because we were looping forever when mbrlen()
got a NUL byte.
if (character_size < 0)
break;
+ /* If we're at a NUL character walk through it
+ */
+ if (character_size == 0)
+ {
+ i++;
+ continue;
+ }
+
keyboard_input = strndup (bytes + i, character_size);
process_keyboard_input (window, keyboard_input, character_size);