mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
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>
This commit is contained in:
committed by
Marge Bot
parent
b096785df4
commit
8d25a89143
Reference in New Issue
Block a user