Fixes: use of uninitialized memory in hScale16To15_c() Fixes: 373924007/clusterfuzz-testcase-minimized-ffmpeg_SWS_fuzzer-5841199968092160
Unified · Split
| @@ -60,7 +60,7 @@ static int alloc_lines(SwsSlice *s, int size, int width) · 59 unmodified lines | |||
| 60 | for (j = 0; j < n; ++j) { | 60 | for (j = 0; j < n; ++j) { |
| 61 | // chroma plane line U and V are expected to be contiguous in memory | 61 | // chroma plane line U and V are expected to be contiguous in memory |
| 62 | // by mmx vertical scaler code | 62 | // by mmx vertical scaler code |
| 63 | s->plane[i].line[j] = av_malloc(size * 2 + 32); | 63 | s->plane[i].line[j] = av_mallocz(size * 2 + 32); |
| 64 | if (!s->plane[i].line[j]) { | 64 | if (!s->plane[i].line[j]) { |
| 65 | free_lines(s); | 65 | free_lines(s); |
| 66 | return AVERROR(ENOMEM); | 66 | return AVERROR(ENOMEM); |