diff options
author | dec05eba <dec05eba@protonmail.com> | 2024-03-10 23:25:22 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2024-03-10 23:25:22 +0100 |
commit | 406f1092caf035edd2ef62130d4b483f15ea52c2 (patch) | |
tree | 1f9c762324b23b411b9254b1da4cafe4e0cbe901 /src/utils.c | |
parent | 877465a702adae8b320b7c6ea8c3c0f2795eb2d0 (diff) |
bad size
Diffstat (limited to 'src/utils.c')
-rw-r--r-- | src/utils.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/utils.c b/src/utils.c index 45e58a6..7dd1890 100644 --- a/src/utils.c +++ b/src/utils.c @@ -416,12 +416,12 @@ static bool try_card_has_valid_plane(const char *card_path) { 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; } @@ -435,7 +435,7 @@ bool gsr_card_path_get_render_path(const char *card_path, char *render_path) { char *render_path_tmp = drmGetRenderDeviceNameFromFd(fd); if(render_path_tmp) { - strncpy(render_path, render_path_tmp, 128); + strncpy(render_path, render_path_tmp, 127); free(render_path_tmp); close(fd); return true; |