aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-02-27 03:12:23 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-03-13 17:06:09 +0100
commit190e8b42834cb7a8af12db25b0f5c8b63abf99a5 (patch)
tree30b65c6afd0a804f21a68a423e59ffc64593beac
parent327b284b582e2d739241419bcc9d6109d0ce56b3 (diff)
downloadffmpeg-190e8b42834cb7a8af12db25b0f5c8b63abf99a5.tar.gz
swscale/utils: clear formatConvBuffer on allocation
Fixes use of uninitialized memory Fixes: asan_heap-oob_35ca682_1474_cov_3230122439_aletrek_tga_16bit.mov Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 007498fc1a639ecee2cda1892cbcff66c7c8c951) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libswscale/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libswscale/utils.c b/libswscale/utils.c
index 50d0498680..80a079b05e 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -1050,7 +1050,7 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter,
c->chrDstW = -((-dstW) >> c->chrDstHSubSample);
c->chrDstH = -((-dstH) >> c->chrDstVSubSample);
- FF_ALLOC_OR_GOTO(c, c->formatConvBuffer, FFALIGN(srcW*2+78, 16) * 2, fail);
+ FF_ALLOCZ_OR_GOTO(c, c->formatConvBuffer, FFALIGN(srcW*2+78, 16) * 2, fail);
/* unscaled special cases */
if (unscaled && !usesHFilter && !usesVFilter &&