libavcodec/mjpegdec.c:1533: 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:1405:1: Parameter `avctx->priv_data->nb_components`
1403. }
1404. 
1405. int ff_mjpeg_decode_frame(AVCodecContext *avctx,
      ^
1406.                               void *data, int *data_size,
1407.                               AVPacket *avpkt)

libavcodec/mjpegdec.c:1533:25: Call
1531.                         break;
1532.                     }
1533.                     if (ff_mjpeg_decode_sos(s, NULL, NULL) < 0 &&
                              ^
1534.                         (avctx->err_recognition & AV_EF_EXPLODE))
1535.                       return AVERROR_INVALIDDATA;

libavcodec/mjpegdec.c:964:1: <Offset trace>
962. }
963. 
964. int ff_mjpeg_decode_sos(MJpegDecodeContext *s,
     ^
965.                         const uint8_t *mb_bitmask, const AVFrame *reference)
966. {

libavcodec/mjpegdec.c:964:1: Parameter `s->nb_components`
  962. }
  963. 
  964. int ff_mjpeg_decode_sos(MJpegDecodeContext *s,
       ^
  965.                         const uint8_t *mb_bitmask, const AVFrame *reference)
  966. {

libavcodec/mjpegdec.c:964:1: <Length trace>
962. }
963. 
964. int ff_mjpeg_decode_sos(MJpegDecodeContext *s,
     ^
965.                         const uint8_t *mb_bitmask, const AVFrame *reference)
966. {

libavcodec/mjpegdec.c:964:1: Parameter `s->h_count[*]`
  962. }
  963. 
  964. int ff_mjpeg_decode_sos(MJpegDecodeContext *s,
       ^
  965.                         const uint8_t *mb_bitmask, const AVFrame *reference)
  966. {

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