xserver/hw/vfb
Mikhail Dmitrichenko c017c9ffeb vfb: use snprintf when writing XWD window name
The window name buffer after XWDFileHeader is fixed at
XWD_WINDOW_NAME_LEN (60 bytes).  sprintf could overflow when
hostname is close to maximum length and combined with the
prefix "Xvfb " + display + screen number.

Switch to snprintf to guarantee we never write beyond the
allocated buffer.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Signed-off-by: Mikhail Dmitrichenko <m.dmitrichenko222@gmail.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2172>
2026-04-15 23:38:29 +00:00
..
man man pages: remove extraneous PP macros 2026-01-25 10:40:01 -08:00
.gitignore Xvfb: build Xvfb man pages using XORG_MANPAGE_SECTIONS 2011-01-18 15:10:24 -08:00
InitInput.c Xvfb: Support up to 13 mouse buttons 2024-01-08 11:16:11 +00:00
InitOutput.c vfb: use snprintf when writing XWD window name 2026-04-15 23:38:29 +00:00
meson.build mi: List extensions in usage message 2021-01-29 12:52:09 +00:00