Merge pull request #74 from andjscott/master
Fix buffer overflow in sprintf
This commit is contained in:
commit
f2736c8ab9
1 changed files with 1 additions and 1 deletions
|
@ -129,7 +129,7 @@ t_sensors *retrieve_sensors()
|
|||
int counter;
|
||||
for (counter = 0; counter < 10; counter++) {
|
||||
|
||||
char hwmon_path[strlen(path_begin)+1];
|
||||
char hwmon_path[strlen(path_begin)+2];
|
||||
|
||||
sprintf(hwmon_path, "%s%d", path_begin, counter);
|
||||
|
||||
|
|
Loading…
Reference in a new issue