1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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: Jan Sebechlebsky <sebechlebskyjan@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Jan Sebechlebsky 2016-05-02 02:51:25 +03:00 committed by Michael Niedermayer
parent 1fee770a1c
commit 0ff3489534

View File

@ -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");