mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-10-26 12:24:33 +00:00
Prevent a potential array overrun.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4556 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
b998b35ecc
commit
83fe82736d
1 file changed
+1
-1
@@ -70,7 +70,7 @@ static void sensors_get_available_features(const sensors_chip_name *name,
|
||||
continue;
|
||||
|
||||
indx = type - first_val - 1;
|
||||
if (indx >= size) {
|
||||
if (indx < 0 || indx >= size) {
|
||||
printf("ERROR: Bug in sensors: index out of bound");
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user