libavcodec/mjpegdec.c:1447: 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:1242:1: Parameter `avctx->priv_data->nb_components`
1240. }
1241. 
1242. int ff_mjpeg_decode_frame(AVCodecContext *avctx,
      ^
1243.                               void *data, int *data_size,
1244.                               AVPacket *avpkt)

libavcodec/mjpegdec.c:1447:21: Call
1445.                         break;
1446.                     }
1447.                     ff_mjpeg_decode_sos(s);
                          ^
1448.                     /* buggy avid puts EOI every 10-20th frame */
1449.                     /* if restart period is over process EOI */

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

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

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

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

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