History

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

Michael Niedermayer committed 2 years ago

Commit aeec39f1 parent b2da4c31 file · +1 −1Browse files

Unified · Split

libswscale/slice.c+1−1
@@ -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 memory61 // chroma plane line U and V are expected to be contiguous in memory
62 // by mmx vertical scaler code62 // 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);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t