Fixes: out of array access Fixes: 62164/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_OSQ_fuzzer-6227491892887552 Fixes: 62164/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_OSQ_fuzzer-6268561729126400 Fixes: 62164/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_OSQ_fuzzer-6414805046788096 Fixes: 62164/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_OSQ_fuzzer-6538151088488448 Fixes: 62164/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_OSQ_fuzzer-6608131540779008
Showing the changes to libavcodec (1 of 1 file). Show all
Unified · Split
| @@ -61,6 +61,14 @@ typedef struct OSQContext { · 60 unmodified lines | |||
| 61 | int pkt_offset; | 61 | int pkt_offset; |
| 62 | } OSQContext; | 62 | } OSQContext; |
| 63 | 63 | ||
| 64 | static void osq_flush(AVCodecContext *avctx) | ||
| 65 | { | ||
| 66 | OSQContext *s = avctx->priv_data; | ||
| 67 | |||
| 68 | s->bitstream_size = 0; | ||
| 69 | s->pkt_offset = 0; | ||
| 70 | } | ||
| 71 | |||
| 64 | static av_cold int osq_close(AVCodecContext *avctx) | 72 | static av_cold int osq_close(AVCodecContext *avctx) |
| 65 | { | 73 | { |
| 66 | OSQContext *s = avctx->priv_data; | 74 | OSQContext *s = avctx->priv_data; |
| @@ -478,4 +486,5 @@ const FFCodec ff_osq_decoder = { · 411 unmodified lines | |||
| 478 | AV_SAMPLE_FMT_S16P, | 486 | AV_SAMPLE_FMT_S16P, |
| 479 | AV_SAMPLE_FMT_S32P, | 487 | AV_SAMPLE_FMT_S32P, |
| 480 | AV_SAMPLE_FMT_NONE }, | 488 | AV_SAMPLE_FMT_NONE }, |
| 489 | .flush = osq_flush, | ||
| 481 | }; | 490 | }; |