libavcodec/mjpegbdec.c:118: error: Buffer Overrun L2
  Offset: [0, max(4, `avctx->priv_data->nb_components`)] Size: 4 by call to `ff_mjpeg_decode_sos`.

libavcodec/mjpegbdec.c:40:1: Parameter `avctx->priv_data->nb_components`
38. }
39. 
40. static int mjpegb_decode_frame(AVCodecContext *avctx,
    ^
41.                               void *data, int *data_size,
42.                               AVPacket *avpkt)

libavcodec/mjpegbdec.c:118:13: Call
116.         s->mjpb_skiptosod = (sod_offs - sos_offs - show_bits(&s->gb, 16));
117.         s->start_code = SOS;
118.         if (ff_mjpeg_decode_sos(s, NULL, NULL) < 0 &&
                 ^
119.             (avctx->err_recognition & AV_EF_EXPLODE))
120.           return AVERROR_INVALIDDATA;

libavcodec/mjpegdec.c:1013:1: <Offset trace>
1011. }
1012. 
1013. int ff_mjpeg_decode_sos(MJpegDecodeContext *s, const uint8_t *mb_bitmask,
      ^
1014.                         const AVFrame *reference)
1015. {

libavcodec/mjpegdec.c:1013:1: Parameter `s->nb_components`
  1011. }
  1012. 
  1013. int ff_mjpeg_decode_sos(MJpegDecodeContext *s, const uint8_t *mb_bitmask,
        ^
  1014.                         const AVFrame *reference)
  1015. {

libavcodec/mjpegdec.c:1013:1: <Length trace>
1011. }
1012. 
1013. int ff_mjpeg_decode_sos(MJpegDecodeContext *s, const uint8_t *mb_bitmask,
      ^
1014.                         const AVFrame *reference)
1015. {

libavcodec/mjpegdec.c:1013:1: Parameter `s->h_count[*]`
  1011. }
  1012. 
  1013. int ff_mjpeg_decode_sos(MJpegDecodeContext *s, const uint8_t *mb_bitmask,
        ^
  1014.                         const AVFrame *reference)
  1015. {

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