Fixes: Use of uninitialized memory Fixes: 71546/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EATGQ_fuzzer-5607656650244096
Showing the changes to libavcodec (1 of 1 file). Show all
Unified · Split
| @@ -209,7 +209,8 @@ static int tgq_decode_mb(TgqContext *s, GetByteContext *gbyte, · 208 unmodified lines | ||
| 209 | 209 | dc[4] = bytestream2_get_byte(gbyte); |
| 210 | 210 | dc[5] = bytestream2_get_byte(gbyte); |
| 211 | 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 | 214 | } else if (mode == 12) { |
| 214 | 215 | for (i = 0; i < 6; i++) { |
| 215 | 216 | dc[i] = bytestream2_get_byte(gbyte); |