libavcodec/mjpegbdec.c:121: error: Buffer Overrun L2
  Offset: [0, max(4, `avctx->priv_data->nb_components`)] Size: 4 by call to `ff_mjpeg_decode_sos`.

libavcodec/mjpegbdec.c:40:1: Parameter `avctx->priv_data->nb_components`
38. }
39. 
40. static int mjpegb_decode_frame(AVCodecContext *avctx,
    ^
41.                               void *data, int *got_frame,
42.                               AVPacket *avpkt)

libavcodec/mjpegbdec.c:121:13: Call
119.         s->mjpb_skiptosod = (sod_offs - sos_offs - show_bits(&s->gb, 16));
120.         s->start_code = SOS;
121.         if (ff_mjpeg_decode_sos(s, NULL, NULL) < 0 &&
                 ^
122.             (avctx->err_recognition & AV_EF_EXPLODE))
123.           return AVERROR_INVALIDDATA;

libavcodec/mjpegdec.c:994:1: <Offset trace>
992. }
993. 
994. int ff_mjpeg_decode_sos(MJpegDecodeContext *s, const uint8_t *mb_bitmask,
     ^
995.                         const AVFrame *reference)
996. {

libavcodec/mjpegdec.c:994:1: Parameter `s->nb_components`
  992. }
  993. 
  994. int ff_mjpeg_decode_sos(MJpegDecodeContext *s, const uint8_t *mb_bitmask,
       ^
  995.                         const AVFrame *reference)
  996. {

libavcodec/mjpegdec.c:994:1: <Length trace>
992. }
993. 
994. int ff_mjpeg_decode_sos(MJpegDecodeContext *s, const uint8_t *mb_bitmask,
     ^
995.                         const AVFrame *reference)
996. {

libavcodec/mjpegdec.c:994:1: Parameter `s->h_count[*]`
  992. }
  993. 
  994. int ff_mjpeg_decode_sos(MJpegDecodeContext *s, const uint8_t *mb_bitmask,
       ^
  995.                         const AVFrame *reference)
  996. {

libavcodec/mjpegdec.c:1033:27: Array access: Offset: [0, max(4, avctx->priv_data->nb_components)] Size: 4 by call to `ff_mjpeg_decode_sos` 
  1031.         s->comp_index[i] = index;
  1032. 
  1033.         s->nb_blocks[i] = s->h_count[index] * s->v_count[index];
                                  ^
  1034.         s->h_scount[i]  = s->h_count[index];
  1035.         s->v_scount[i]  = s->v_count[index];
