Merge pull request #74 from andjscott/master

Fix buffer overflow in sprintf
This commit is contained in:
Daniel Graziotin 2016-03-17 13:43:49 +01:00
commit f2736c8ab9

View file

@ -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);