Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-02-27 05:12:23 +0300
committerMichael Niedermayer <michaelni@gmx.at>2015-02-27 05:13:14 +0300
commit007498fc1a639ecee2cda1892cbcff66c7c8c951 (patch)
tree5706bccfcf0856e2d2466c31e100c5b1f8cb94bb /libswscale
parentd0b8640f75ff7569c98d6fdb03d83451104e088c (diff)
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>
Diffstat (limited to 'libswscale')
-rw-r--r--libswscale/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libswscale/utils.c b/libswscale/utils.c
index cfa6b21794..df8d0a92ca 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -1184,7 +1184,7 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter,
c->chrDstW = FF_CEIL_RSHIFT(dstW, c->chrDstHSubSample);
c->chrDstH = FF_CEIL_RSHIFT(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);
c->srcBpc = 1 + desc_src->comp[0].depth_minus1;
if (c->srcBpc < 8)