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

libavcodec/mjpegdec.c:1429:1: Parameter `avctx->priv_data->nb_components`
1427. }
1428. 
1429. int ff_mjpeg_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
      ^
1430.                           AVPacket *avpkt)
1431. {

libavcodec/mjpegdec.c:1567:28: Call
1565.                     break;
1566.                     }
1567.                 if ((ret = ff_mjpeg_decode_sos(s, NULL, NULL)) < 0 &&
                                 ^
1568.                     (avctx->err_recognition & AV_EF_EXPLODE))
1569.                     return ret;

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

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

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

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

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