backend: driver: fix string out-of-bound read

libxcb doesn't null terminate strings.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui
2019-04-20 01:09:10 +01:00
parent 197e9dc866
commit b35bfd07d1
2 changed files with 6 additions and 2 deletions

View File

@@ -24,7 +24,7 @@ enum driver {
DRIVER_MODESETTING = 64,
};
/// Return a list of drivers currently in use by the X server.
/// Return a list of all drivers currently in use by the X server.
/// Note, this is a best-effort test, so no guarantee all drivers will be detected.
enum driver detect_driver(xcb_connection_t *, struct backend_base *, xcb_window_t);