History

avcodec/eatgq: Check bytestream2_get_buffer() for failure

Fixes: Use of uninitialized memory Fixes: 71546/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EATGQ_fuzzer-5607656650244096

Michael Niedermayer committed 2 years ago

Commit 4949e341 parent cdce6a81 file · +2 −1Browse files

Showing the changes to libavcodec (1 of 1 file). Show all

Unified · Split

libavcodec/eatgq.c+2−1
@@ -209,7 +209,8 @@ static int tgq_decode_mb(TgqContext *s, GetByteContext *gbyte, · 208 unmodified lines
209209 dc[4] = bytestream2_get_byte(gbyte);
210210 dc[5] = bytestream2_get_byte(gbyte);
211211 } else if (mode == 6) {
212− bytestream2_get_buffer(gbyte, dc, 6);
212+ if (bytestream2_get_buffer(gbyte, dc, 6) != 6)
213+ return AVERROR_INVALIDDATA;
213214 } else if (mode == 12) {
214215 for (i = 0; i < 6; i++) {
215216 dc[i] = bytestream2_get_byte(gbyte);

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