summaryrefslogtreecommitdiff
authorMichael Niedermayer <michaelni@gmx.at>2012-02-29 03:25:13 (GMT)
committer Michael Niedermayer <michaelni@gmx.at>2012-02-29 03:25:13 (GMT)
commitf5bf7b9f4baf9f4626146f996df47c1d37517024 (patch)
tree170066ac48be2fba1cf792427119de81fefa7a3c
parentf54e06feb363e7c704fbca52cb057d742285d7bf (diff)
downloadffmpeg-f5bf7b9f4baf9f4626146f996df47c1d37517024.zip
ffmpeg-f5bf7b9f4baf9f4626146f996df47c1d37517024.tar.gz
ffmpeg-f5bf7b9f4baf9f4626146f996df47c1d37517024.tar.bz2
libpostproc: fix out of array accesses detected by AddressSanitizer.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat
-rw-r--r--libpostproc/postprocess_template.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libpostproc/postprocess_template.c b/libpostproc/postprocess_template.c
index 4b8184c..3419257 100644
--- a/libpostproc/postprocess_template.c
+++ b/libpostproc/postprocess_template.c
@@ -3549,7 +3549,7 @@ static void RENAME(postProcess)(const uint8_t src[], int srcStride, uint8_t dst[
{
RENAME(tempNoiseReducer)(dstBlock-8, stride,
c.tempBlurred[isColor] + y*dstStride + x,
- c.tempBlurredPast[isColor] + (y>>3)*256 + (x>>3),
+ c.tempBlurredPast[isColor] + (y>>3)*256 + (x>>3) + 256,
c.ppMode.maxTmpNoise);
}
}
@@ -3571,7 +3571,7 @@ static void RENAME(postProcess)(const uint8_t src[], int srcStride, uint8_t dst[
if((mode & TEMP_NOISE_FILTER)){
RENAME(tempNoiseReducer)(dstBlock-8, dstStride,
c.tempBlurred[isColor] + y*dstStride + x,
- c.tempBlurredPast[isColor] + (y>>3)*256 + (x>>3),
+ c.tempBlurredPast[isColor] + (y>>3)*256 + (x>>3) + 256,
c.ppMode.maxTmpNoise);
}