libavcodec/mjpegdec.c:1547: 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:1416:1: Parameter `avctx->priv_data->nb_components`
1414. }
1415. 
1416. int ff_mjpeg_decode_frame(AVCodecContext *avctx,
      ^
1417.                               void *data, int *data_size,
1418.                               AVPacket *avpkt)

libavcodec/mjpegdec.c:1547:21: Call
1545.                         break;
1546.                     }
1547.                     ff_mjpeg_decode_sos(s, NULL, NULL);
                          ^
1548.                     /* buggy avid puts EOI every 10-20th frame */
1549.                     /* if restart period is over process EOI */

libavcodec/mjpegdec.c:952:1: <Offset trace>
950. }
951. 
952. int ff_mjpeg_decode_sos(MJpegDecodeContext *s,
     ^
953.                         const uint8_t *mb_bitmask, const AVFrame *reference)
954. {

libavcodec/mjpegdec.c:952:1: Parameter `s->nb_components`
  950. }
  951. 
  952. int ff_mjpeg_decode_sos(MJpegDecodeContext *s,
       ^
  953.                         const uint8_t *mb_bitmask, const AVFrame *reference)
  954. {

libavcodec/mjpegdec.c:952:1: <Length trace>
950. }
951. 
952. int ff_mjpeg_decode_sos(MJpegDecodeContext *s,
     ^
953.                         const uint8_t *mb_bitmask, const AVFrame *reference)
954. {

libavcodec/mjpegdec.c:952:1: Parameter `s->h_count[*]`
  950. }
  951. 
  952. int ff_mjpeg_decode_sos(MJpegDecodeContext *s,
       ^
  953.                         const uint8_t *mb_bitmask, const AVFrame *reference)
  954. {

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