Skip to content
Commit 51156d58 authored by Mikko Rapeli's avatar Mikko Rapeli Committed by Jean-Baptiste Mardelle
Browse files

audioCorrelationInfo.cpp: check for division by zero

Fixes Coverity CID 709286: Division or modulo by zero (DIVIDE_BY_ZERO)
Assigning: "maxVal" = "this->max()".
On this path, function call "this->max()" has return value of 0
78    int64_t maxVal = max();
...
Division by expression "maxVal" which may be zero has undefined behavior
86        val = m_correlationVector[x]/double(maxVal)*img.height();
parent d5bbdb44
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment