mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-08 03:45:24 +00:00
wm: sanitize the view title
By replacing '"' by ''', we work around issue #1757.
This commit is contained in:
parent
220d143e44
commit
75111c4f1a
@ -673,9 +673,18 @@ class Wm::Nitpicker::Session_component : public Rpc_object<Nitpicker::Session>,
|
||||
|
||||
case Command::OP_TITLE:
|
||||
{
|
||||
char sanitized_title[command.title.title.capacity()];
|
||||
|
||||
Genode::strncpy(sanitized_title, command.title.title.string(),
|
||||
sizeof(sanitized_title));
|
||||
|
||||
for (char *c = sanitized_title; *c; c++)
|
||||
if (*c == '"')
|
||||
*c = '\'';
|
||||
|
||||
Locked_ptr<View> view(_view_handle_registry.lookup(command.title.view));
|
||||
if (view.is_valid())
|
||||
view->title(command.title.title.string());
|
||||
view->title(sanitized_title);
|
||||
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user