seat: Use PATH_MAX long array for realpath

This commit is contained in:
Kenny Levinsen 2020-07-31 15:58:19 +02:00
parent 9d08511da4
commit 85860e4e7c

View file

@ -135,7 +135,7 @@ struct seat_device *seat_open_device(struct client *client, const char *path) {
return NULL; return NULL;
} }
char sanitized_path[MAX_PATH_LEN]; char sanitized_path[PATH_MAX];
if (realpath(path, sanitized_path) == NULL) { if (realpath(path, sanitized_path) == NULL) {
log_errorf("invalid path '%s': %s", path, strerror(errno)); log_errorf("invalid path '%s': %s", path, strerror(errno));
return NULL; return NULL;