libavcodec/mjpegdec.c:1455: 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:1259:1: Parameter `avctx->priv_data->nb_components`
1257. }
1258. 
1259. int ff_mjpeg_decode_frame(AVCodecContext *avctx,
      ^
1260.                               void *data, int *data_size,
1261.                               AVPacket *avpkt)

libavcodec/mjpegdec.c:1455:21: Call
1453.                     break;
1454.                 case SOS:
1455.                     ff_mjpeg_decode_sos(s);
                          ^
1456.                     /* buggy avid puts EOI every 10-20th frame */
1457.                     /* if restart period is over process EOI */

libavcodec/mjpegdec.c:885:1: <Offset trace>
883. }
884. 
885. int ff_mjpeg_decode_sos(MJpegDecodeContext *s)
     ^
886. {
887.     int len, nb_components, i, h, v, predictor, point_transform;

libavcodec/mjpegdec.c:885:1: Parameter `s->nb_components`
  883. }
  884. 
  885. int ff_mjpeg_decode_sos(MJpegDecodeContext *s)
       ^
  886. {
  887.     int len, nb_components, i, h, v, predictor, point_transform;

libavcodec/mjpegdec.c:885:1: <Length trace>
883. }
884. 
885. int ff_mjpeg_decode_sos(MJpegDecodeContext *s)
     ^
886. {
887.     int len, nb_components, i, h, v, predictor, point_transform;

libavcodec/mjpegdec.c:885:1: Parameter `s->h_count[*]`
  883. }
  884. 
  885. int ff_mjpeg_decode_sos(MJpegDecodeContext *s)
       ^
  886. {
  887.     int len, nb_components, i, h, v, predictor, point_transform;

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