dee

Coverity DIVIDE_BY_ZERO - CID 10199

Bug #937409 reported by Product Strategy Coverity Bug Uploader
This bug report is a duplicate of:  Bug #904995: Coverity DIVIDE_BY_ZERO - CID 10028. Edit Remove
0
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dee
Status tracked in 1.0
1.0
New
Medium
Unassigned

Bug Description

This bug is exported from the Coverity Integration Manager on Canonical's servers. For information on how this is done please see this website: https://wiki.ubuntu.com/CanonicalProductStrategy/Coverity
CID: 10199
Checker: DIVIDE_BY_ZERO
Category: No category available
CWE definition: http://cwe.mitre.org/data/definitions/571.html
File: /tmp/buildd/dee-1.0.4/tests/test-benchmark.c
Function: run_benchmark()
Code snippet:
 77 total_runtime += bench->runs[i].elapsed;
 78 }
 79
 80 /* Compute average runtime */
CID 10199 - DIVIDE_BY_ZERO
Division by expression "bench->n_runs" which may be zero has undefined behavior
 81 avg_runtime = total_runtime / bench->n_runs;
 82
 83 /* Compute standard deviation */
 84 std_dev = 0;
 85 for (i = 0; i < bench->n_runs; i++)
 86 {

Revision history for this message
Product Strategy Coverity Bug Uploader (coverity-uploader) wrote : dee-1.0: /tmp/buildd/dee-1.0.4/tests/test-benchmark.c

Source file with Coverity annotations.

Changed in dee:
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.