swc

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.nihaljere.xyz/swc
Log | Files | Refs | README | LICENSE

commit 8cf6b8030797499d870a234010b6c87bed17ac2d
parent ba1ba42d897487ff48532e81920c88963aa53a7e
Author: Michael Forney <mforney@mforney.org>
Date:   Fri, 21 Feb 2020 10:41:24 -0800

drm: Use PATH_MAX for primary node path to prevent format truncation warning

Diffstat:
Mlibswc/drm.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libswc/drm.c b/libswc/drm.c @@ -34,6 +34,7 @@ #include <dirent.h> #include <errno.h> +#include <limits.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -244,7 +245,7 @@ bool drm_initialize(void) { uint64_t val; - char primary[128]; + char primary[PATH_MAX]; if (!find_primary_drm_device(primary, sizeof(primary))) { ERROR("Could not find DRM device\n");