diff options
author | Eric Anholt <eric@anholt.net> | 2017-09-02 21:38:51 -0700 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2017-09-05 13:44:21 +0200 |
commit | 7f92d00164330af5816e96ad964daf718d8d78c4 (patch) | |
tree | 58ae20622676b188c291cae28b838a185dce3b52 /lib | |
parent | 925900e66156e943f2418b1c7702bd16d41e348b (diff) |
Use PATH_MAX to fix some sprintf-into-short-buffers warnings.
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/igt_debugfs.c | 4 | ||||
-rw-r--r-- | lib/igt_sysfs.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c index 090b56e0..63183e57 100644 --- a/lib/igt_debugfs.c +++ b/lib/igt_debugfs.c @@ -491,7 +491,7 @@ static void igt_pipe_crc_reset(int drm_fd) } while ((dirent = readdir(dir))) { - char buf[128]; + char buf[PATH_MAX]; if (strcmp(dirent->d_name, "crtc-") != 0) continue; @@ -525,7 +525,7 @@ static void igt_pipe_crc_reset(int drm_fd) static void pipe_crc_exit_handler(int sig) { struct dirent *dirent; - char buf[128]; + char buf[PATH_MAX]; DIR *dir; int fd; diff --git a/lib/igt_sysfs.c b/lib/igt_sysfs.c index 15ed34be..9227e374 100644 --- a/lib/igt_sysfs.c +++ b/lib/igt_sysfs.c @@ -192,7 +192,7 @@ int igt_sysfs_open_parameters(int device) if (params < 0) { /* builtin? */ drm_version_t version; char name[32] = ""; - char path[128]; + char path[PATH_MAX]; memset(&version, 0, sizeof(version)); version.name_len = sizeof(name); @@ -499,7 +499,7 @@ void kick_fbcon(bool enable) return; while ((de = readdir(dir))) { - char buf[128]; + char buf[PATH_MAX]; int fd, len; if (strncmp(de->d_name, "vtcon", 5)) |