From 6361d998b835fe15a5235be7b69e705d8fbc4226 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 10 Mar 2024 23:23:48 +0100 Subject: bad size --- src/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index d6615f8..db43d70 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -872,12 +872,12 @@ static bool try_card_has_valid_plane(const char *card_path) { /* output should be >= 128 bytes */ static bool gsr_get_valid_card_path(gsr_egl *egl, char *output) { if(egl->dri_card_path) { - strncpy(output, egl->dri_card_path, 128); + strncpy(output, egl->dri_card_path, 127); return try_card_has_valid_plane(output); } for(int i = 0; i < 10; ++i) { - snprintf(output, 128, DRM_DEV_NAME, DRM_DIR_NAME, i); + snprintf(output, 127, DRM_DEV_NAME, DRM_DIR_NAME, i); if(try_card_has_valid_plane(output)) return true; } -- cgit v1.2.3