libavcodec/mjpegdec.c:1528: 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:1400:1: Parameter `avctx->priv_data->nb_components`
1398. }
1399. 
1400. int ff_mjpeg_decode_frame(AVCodecContext *avctx,
      ^
1401.                               void *data, int *data_size,
1402.                               AVPacket *avpkt)

libavcodec/mjpegdec.c:1528:25: Call
1526.                         break;
1527.                     }
1528.                     if (ff_mjpeg_decode_sos(s, NULL, NULL) < 0 &&
                              ^
1529.                         avctx->error_recognition >= FF_ER_EXPLODE)
1530.                       return AVERROR_INVALIDDATA;

libavcodec/mjpegdec.c:959:1: <Offset trace>
957. }
958. 
959. int ff_mjpeg_decode_sos(MJpegDecodeContext *s,
     ^
960.                         const uint8_t *mb_bitmask, const AVFrame *reference)
961. {

libavcodec/mjpegdec.c:959:1: Parameter `s->nb_components`
  957. }
  958. 
  959. int ff_mjpeg_decode_sos(MJpegDecodeContext *s,
       ^
  960.                         const uint8_t *mb_bitmask, const AVFrame *reference)
  961. {

libavcodec/mjpegdec.c:959:1: <Length trace>
957. }
958. 
959. int ff_mjpeg_decode_sos(MJpegDecodeContext *s,
     ^
960.                         const uint8_t *mb_bitmask, const AVFrame *reference)
961. {

libavcodec/mjpegdec.c:959:1: Parameter `s->h_count[*]`
  957. }
  958. 
  959. int ff_mjpeg_decode_sos(MJpegDecodeContext *s,
       ^
  960.                         const uint8_t *mb_bitmask, const AVFrame *reference)
  961. {

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