mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-11 17:30:00 +01:00
swscale/slice: clear allocated memory in alloc_lines()
Fixes: use of uninitialized memory in hScale16To15_c()
Fixes: 373924007/clusterfuzz-testcase-minimized-ffmpeg_SWS_fuzzer-5841199968092160
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit aeec39f3c1)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@@ -59,7 +59,7 @@ static int alloc_lines(SwsSlice *s, int size, int width)
|
||||
for (j = 0; j < n; ++j) {
|
||||
// chroma plane line U and V are expected to be contiguous in memory
|
||||
// by mmx vertical scaler code
|
||||
s->plane[i].line[j] = av_malloc(size * 2 + 32);
|
||||
s->plane[i].line[j] = av_mallocz(size * 2 + 32);
|
||||
if (!s->plane[i].line[j]) {
|
||||
free_lines(s);
|
||||
return AVERROR(ENOMEM);
|
||||
|
||||
Reference in New Issue
Block a user