From f7ed895f3ba6e8082843fc33d65ec4d4a424d4cc Mon Sep 17 00:00:00 2001 From: Drath Date: Wed, 24 Jun 2026 21:04:00 +0200 Subject: [PATCH] again slightly less dumb --- src/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils.c b/src/utils.c index 5fb52aa..d670043 100644 --- a/src/utils.c +++ b/src/utils.c @@ -87,7 +87,7 @@ int get_hwmon_dir(char *path, const size_t bufsz) { inline size_t read_file(const char *dir, const char *file, char *buffer, const size_t n) { char path[160]; // bug alert char *nt = stpcpy(path, dir); // nt is a pointer to the null terminator of the copied string - stpcpy(nt, file); // write at the null terminator address, aka append to the end + strcpy(nt, file); // copy to the null terminator of prev copy, append basically const int fd = open(path, O_RDONLY | O_CLOEXEC); if (fd < 0) { if (buffer != NULL) // if its null means we're just checking if it exists at all, so dont log it