summaryrefslogtreecommitdiff
path: root/graphics/java/android/renderscript/ProgramFragmentFixedFunction.java
diff options
context:
space:
mode:
authorMartin Storsjo <martin@martin.st>2012-02-19 21:46:24 +0200
committerMartin Storsjo <martin@martin.st>2012-02-19 21:47:54 +0200
commit27bd8da964055446a5f0d1696f412c854aaf7b70 (patch)
tree3c0088dd3097756dd65e793541e5ed74bde07405 /graphics/java/android/renderscript/ProgramFragmentFixedFunction.java
parent23d3628628e4d3a89a41b6429a40745b304de8e2 (diff)
stagefright aacenc: Avoid overflows when calculating normFactor
normFactor is calculated using the saturating L_add function, but if the value added (*psfbPeFactors) is negative, the sum can end up negative. *psfbPeFactors can end up negative if redThrExp is less than *psfbNActiveLines. In cases where *psfbPeFactors ended up negative, normFactor became INT_MIN, causing division by zero later. Change-Id: I00c852e457b22f7eef4d6ed1887629828057206b
Diffstat (limited to 'graphics/java/android/renderscript/ProgramFragmentFixedFunction.java')
0 files changed, 0 insertions, 0 deletions