Commit 0ff34895 authored by Jan Sebechlebsky's avatar Jan Sebechlebsky Committed by Michael Niedermayer

avcodec/mjpeg2jpeg_bsf: Check ff_bsf_get_packet success

This fixes ticket #5487 - mjpeg2jpeg bitstream filter causes
segmentation fault with header-less mjpeg.
Signed-off-by: 's avatarJan Sebechlebsky <sebechlebskyjan@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 1fee770a
......@@ -86,6 +86,8 @@ static int mjpeg2jpeg_filter(AVBSFContext *ctx, AVPacket *out)
uint8_t *output;
ret = ff_bsf_get_packet(ctx, &in);
if (ret < 0)
return ret;
if (in->size < 12) {
av_log(ctx, AV_LOG_ERROR, "input is truncated\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment