libavcodec/mjpegdec.c:1578: 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:1446:1: Parameter `avctx->priv_data->nb_components`
1444. }
1445. 
1446. int ff_mjpeg_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
      ^
1447.                           AVPacket *avpkt)
1448. {

libavcodec/mjpegdec.c:1578:21: Call
1576.                     break;
1577.                     }
1578.                 if (ff_mjpeg_decode_sos(s, NULL, NULL) < 0 &&
                          ^
1579.                     (avctx->err_recognition & AV_EF_EXPLODE))
1580.                     return AVERROR_INVALIDDATA;

libavcodec/mjpegdec.c:1013:1: <Offset trace>
1011. }
1012. 
1013. int ff_mjpeg_decode_sos(MJpegDecodeContext *s, const uint8_t *mb_bitmask,
      ^
1014.                         const AVFrame *reference)
1015. {

libavcodec/mjpegdec.c:1013:1: Parameter `s->nb_components`
  1011. }
  1012. 
  1013. int ff_mjpeg_decode_sos(MJpegDecodeContext *s, const uint8_t *mb_bitmask,
        ^
  1014.                         const AVFrame *reference)
  1015. {

libavcodec/mjpegdec.c:1013:1: <Length trace>
1011. }
1012. 
1013. int ff_mjpeg_decode_sos(MJpegDecodeContext *s, const uint8_t *mb_bitmask,
      ^
1014.                         const AVFrame *reference)
1015. {

libavcodec/mjpegdec.c:1013:1: Parameter `s->h_count[*]`
  1011. }
  1012. 
  1013. int ff_mjpeg_decode_sos(MJpegDecodeContext *s, const uint8_t *mb_bitmask,
        ^
  1014.                         const AVFrame *reference)
  1015. {

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