tools/power/x86/intel-speed-select: Fix off by one check
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 18 Jul 2022 13:17:17 +0000 (16:17 +0300)
committerHans de Goede <hdegoede@redhat.com>
Thu, 28 Jul 2022 17:41:07 +0000 (19:41 +0200)
commitd9f74d98bbec978edbf860f729b531281ba0d8ff
tree33ef192dfd4ff4b0a0b32293df87e6e156cbf152
parent7a4a04f4e90d746928501a6d551de87d02c28323
tools/power/x86/intel-speed-select: Fix off by one check

Change > MAX_DIE_PER_PACKAGE to >= MAX_DIE_PER_PACKAGE to prevent
accessing one element beyond the end of the array.

Fixes: 7fd786dfbd2c ("tools/power/x86/intel-speed-select: OOB daemon mode")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
tools/power/x86/intel-speed-select/isst-daemon.c