aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-sqlite.py
diff options
context:
space:
mode:
authorZicheng Qu <[email protected]>2024-10-31 01:46:26 +0000
committerJonathan Cameron <[email protected]>2024-10-31 21:49:26 +0000
commit7452f8a0814bb73f739ee0dab60f099f3361b151 (patch)
tree5deb8f74e03c86fd0c0b10b71e8ba819a0037b4d /tools/perf/scripts/python/export-to-sqlite.py
parente2fb2f89faf87b681038475d093214f4cbe12ebb (diff)
iio: gts: fix infinite loop for gain_to_scaletables()
In iio_gts_build_avail_time_table(), it is checked that gts->num_itime is non-zero, but gts->num_itime is not checked in gain_to_scaletables(). The variable time_idx is initialized as gts->num_itime - 1. This implies that time_idx might initially be set to -1 (0 - 1 = -1). Consequently, using while (time_idx--) could lead to an infinite loop. Cc: [email protected] # v6.6+ Fixes: 38416c28e168 ("iio: light: Add gain-time-scale helpers") Signed-off-by: Zicheng Qu <[email protected]> Reviewed-by: Matti Vaittinen <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions