commit 8cf6b80

Michael Forney  ·  2020-02-21 18:41:24 +0000 UTC
parent ba1ba42
drm: Use PATH_MAX for primary node path to prevent format truncation warning
1 files changed,  +2, -1
+2, -1
 1@@ -34,6 +34,7 @@
 2 
 3 #include <dirent.h>
 4 #include <errno.h>
 5+#include <limits.h>
 6 #include <stdio.h>
 7 #include <stdlib.h>
 8 #include <string.h>
 9@@ -244,7 +245,7 @@ bool
10 drm_initialize(void)
11 {
12 	uint64_t val;
13-	char primary[128];
14+	char primary[PATH_MAX];
15 
16 	if (!find_primary_drm_device(primary, sizeof(primary))) {
17 		ERROR("Could not find DRM device\n");