fwts: cpufreq: fix theoretical division by zero
Bug #1466905 reported by
Colin Ian King
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Firmware Test Suite |
Fix Released
|
Low
|
Colin Ian King |
Bug Description
CoverityScan reports a potential division by zero error:
528 performed_tests++;
CID 1299399 (#1 of 2): Division or modulo by zero (DIVIDE_BY_ZERO) [select issue]
529 fwts_progress(fw, 100 * performed_
it is noteworthy that n_tests is never zero because it is related to the number of CPUs online which is always going to be > 0, but coverity does not know this and also we better ensure we check for this division by zero since the CPU online data may be not available and there is a theoretical risk of n_tests being zero.
Related branches
Changed in fwts: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Fix sent to fwts-devel for review: https:/ /lists. ubuntu. com/archives/ fwts-devel/ 2015-June/ 006356. html