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