Files
xserver/os
Mikhail Dmitrichenko 8abd191eea os: avoid potential out-of-bounds access at logVHdrMessageVerb
The LogVHdrMessageVerb function may access an array out of bounds in a
specific edge case. Specifically, the line:

newline = (buf[len - 1] == '\n');

can result in accessing buf[-1] if len == 0, which is undefined behavior.

Commit adds check to avoid access out of bounds at pointed line.

Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1841
Signed-off-by: Mikhail Dmitrichenko <m.dmitrichenko222@gmail.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2061>
(cherry picked from commit 8d25a89143)
2026-01-25 10:40:02 -08:00
..
2026-01-25 10:39:53 -08:00
2026-01-25 10:39:53 -08:00
2026-01-19 12:47:57 -08:00
2026-01-25 10:40:02 -08:00
2016-07-21 15:04:47 -04:00
2012-03-21 13:54:42 -07:00
2012-03-21 13:54:42 -07:00
2026-01-25 10:40:02 -08:00
2026-01-19 12:32:20 -08:00
2026-01-19 12:32:20 -08:00
2013-10-31 16:58:12 -07:00