On Mon, 27 Aug 2018 at 19:20, Rostislav Pehlivanov <atomnu...@gmail.com> wrote:
> > > On Sat, 25 Aug 2018 at 21:04, Paul B Mahol <one...@gmail.com> wrote: > >> Signed-off-by: Paul B Mahol <one...@gmail.com> >> --- >> configure | 1 + >> libavcodec/Makefile | 1 + >> libavcodec/allcodecs.c | 1 + >> libavcodec/avcodec.h | 1 + >> libavcodec/codec_desc.c | 7 ++ >> libavcodec/mwsc.c | 192 ++++++++++++++++++++++++++++++++++++++++ >> libavformat/riff.c | 1 + >> 7 files changed, 204 insertions(+) >> create mode 100644 libavcodec/mwsc.c >> >> +static int decode_frame(AVCodecContext *avctx, >> + void *data, int *got_frame, >> + AVPacket *avpkt) >> +{ >> + MWSCContext *s = avctx->priv_data; >> + AVFrame *frame = data; >> + uint8_t *buf = avpkt->data; >> + int buf_size = avpkt->size; >> + GetByteContext gb; >> + GetByteContext gbp; >> + PutByteContext pb; >> + int ret; >> > > Can you check that avpkt->size isn't larger than the deflate buffer you've > allocated? > If zlib checks that the buffer size is smaller than what it has to unpack don't, same as the wincam decoder. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel