Skip to content

Commit f2736c8

Browse files
committed
Merge pull request #74 from andjscott/master
Fix buffer overflow in sprintf
2 parents 9306d98 + 2446a12 commit f2736c8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/mbpfan.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ t_sensors *retrieve_sensors()
129129
int counter;
130130
for (counter = 0; counter < 10; counter++) {
131131

132-
char hwmon_path[strlen(path_begin)+1];
132+
char hwmon_path[strlen(path_begin)+2];
133133

134134
sprintf(hwmon_path, "%s%d", path_begin, counter);
135135

0 commit comments

Comments
 (0)