mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-02-19 17:00:36 +01:00
xwayland: Update output nameLength
At creation, Xwayland uses a generic output name ("XWAYLAND0", etc.) for
the XRandR outputs, and later, once the name is known from the Wayland
protocols, updates the output names using the actual names from the
Wayland compositor.
However, when doing so, it simply updates the string, the "nameLength"
isn't updated, so the name passed to the clients might either end up
being truncated or contain portions of the previous (initial) output
name.
Note, this is using a fixed size buffer initialized with zeros, so this
cannot leak any data other than the previous output name, so this is
mainly a cosmetic issue.
Update the output's "nameLength" when updating the output name.
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Fixes: 3c07a01c42 - xwayland: Use xdg-output name for XRandR
Reviewed-by: Simon Ser <contact@emersion.fr>
(cherry picked from commit 0e314afef6)
This commit is contained in:
parent
7883646a8f
commit
a07ce75d93
1 changed files with 1 additions and 0 deletions
|
|
@ -683,6 +683,7 @@ xwl_output_set_name(struct xwl_output *xwl_output, const char *name)
|
|||
}
|
||||
|
||||
snprintf(xwl_output->randr_output->name, MAX_OUTPUT_NAME, "%s", name);
|
||||
xwl_output->randr_output->nameLength = strlen(xwl_output->randr_output->name);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue