]> git.sesse.net Git - kdenlive/commit
audioCorrelationInfo.cpp: check for division by zero
authorMikko Rapeli <mikko.rapeli@iki.fi>
Fri, 10 Aug 2012 12:17:05 +0000 (14:17 +0200)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Sun, 2 Sep 2012 09:40:49 +0000 (11:40 +0200)
commit51156d5897f31b45f4c7a8fb990f018645a7a466
treed86dcfdacfaede46b9da56a4ab0fc8af5b483a88
parentd5bbdb443ab800dcc02dd4f9b486f4cec3af5e60
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();
src/lib/audio/audioCorrelationInfo.cpp