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

Unified · Split

libavcodec/eatgq.c+2−1
@@ -209,7 +209,8 @@ static int tgq_decode_mb(TgqContext *s, GetByteContext *gbyte, · 208 unmodified lines
209 dc[4] = bytestream2_get_byte(gbyte);209 dc[4] = bytestream2_get_byte(gbyte);
210 dc[5] = bytestream2_get_byte(gbyte);210 dc[5] = bytestream2_get_byte(gbyte);
211 } else if (mode == 6) {211 } else if (mode == 6) {
212 bytestream2_get_buffer(gbyte, dc, 6);212 if (bytestream2_get_buffer(gbyte, dc, 6) != 6)
213 return AVERROR_INVALIDDATA;
213 } else if (mode == 12) {214 } else if (mode == 12) {
214 for (i = 0; i < 6; i++) {215 for (i = 0; i < 6; i++) {
215 dc[i] = bytestream2_get_byte(gbyte);216 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