ig this is even less stupid

This commit is contained in:
2026-06-24 20:35:03 +02:00
parent 0352675e79
commit 42f702ca1b

View File

@@ -70,7 +70,7 @@ inline char *pretty_bytes(const uint64_t bytes, int8_t start_suffix, char *buf,
int get_hwmon_dir(char *path, const size_t bufsz) {
glob_t g;
strcpy(path + strlen(path), "/hwmon*");
strcat(path, "/hwmon*");
if (glob(path, 0, NULL, &g) == 0) {
strlcpy(path, g.gl_pathv[0], bufsz); // same size as hwmon length, careful