libavcodec/hevc.c:518: error: Buffer Overrun L1
  Offset: -1 Size: 7 by call to `set_sps`.

libavcodec/hevc.c:517:9: Call
515.         s->sps = (HEVCSPS*)s->sps_list[s->pps->sps_id]->data;
516. 
517.         ff_hevc_clear_refs(s);
             ^
518.         ret = set_sps(s, s->sps);
519.         if (ret < 0)

libavcodec/hevc_refs.c:70:9: Call
  68.     int i;
  69.     for (i = 0; i < FF_ARRAY_ELEMS(s->DPB); i++)
  70.         ff_hevc_unref_frame(s, &s->DPB[i],
              ^
  71.                             HEVC_FRAME_FLAG_SHORT_REF |
  72.                             HEVC_FRAME_FLAG_LONG_REF);

libavcodec/hevc_refs.c:39:9: Call
    37.     frame->flags &= ~flags;
    38.     if (!frame->flags) {
    39.         ff_thread_release_buffer(s->avctx, &frame->tf);
                ^
    40. 
    41.         av_buffer_unref(&frame->tab_mvf_buf);

libavcodec/pthread_frame.c:785:9: Call
      783. 
      784.     if (can_direct_free) {
      785.         av_frame_unref(f->f);
                   ^
      786.         return;
      787.     }

libavutil/frame.c:306:5: Call
        304.         av_buffer_unref(&frame->extended_buf[i]);
        305.     av_freep(&frame->extended_buf);
        306.     get_frame_defaults(frame);
                 ^
        307. }
        308. 

libavutil/frame.c:38:46: Assignment
          36.     frame->pts                 = AV_NOPTS_VALUE;
          37.     frame->key_frame           = 1;
          38.     frame->sample_aspect_ratio = (AVRational){ 0, 1 };
                                                           ^
          39.     frame->format              = -1; /* unknown */
          40.     frame->extended_data       = frame->data;

libavcodec/hevc.c:518:15: Call
516. 
517.         ff_hevc_clear_refs(s);
518.         ret = set_sps(s, s->sps);
                   ^
519.         if (ret < 0)
520.             return ret;

libavcodec/hevc.c:432:1: Parameter `sps->max_sub_layers`
  430. }
  431. 
  432. static int set_sps(HEVCContext *s, const HEVCSPS *sps)
       ^
  433. {
  434.     #define HWACCEL_MAX (CONFIG_HEVC_DXVA2_HWACCEL + CONFIG_HEVC_D3D11VA_HWACCEL)

libavcodec/hevc.c:438:5: Call
  436.     int ret;
  437. 
  438.     export_stream_params(s->avctx, s, sps);
           ^
  439. 
  440.     pic_arrays_free(s);

libavcodec/hevc.c:386:1: <Offset trace>
384. }
385. 
386. static void export_stream_params(AVCodecContext *avctx,
     ^
387.                                  const HEVCContext *s, const HEVCSPS *sps)
388. {

libavcodec/hevc.c:386:1: Parameter `sps->max_sub_layers`
    384. }
    385. 
    386. static void export_stream_params(AVCodecContext *avctx,
         ^
    387.                                  const HEVCContext *s, const HEVCSPS *sps)
    388. {

libavcodec/hevc.c:386:1: <Length trace>
384. }
385. 
386. static void export_stream_params(AVCodecContext *avctx,
     ^
387.                                  const HEVCContext *s, const HEVCSPS *sps)
388. {

libavcodec/hevc.c:386:1: Parameter `sps->temporal_layer[*]`
    384. }
    385. 
    386. static void export_stream_params(AVCodecContext *avctx,
         ^
    387.                                  const HEVCContext *s, const HEVCSPS *sps)
    388. {

libavcodec/hevc.c:397:34: Array access: Offset: -1 Size: 7 by call to `set_sps` 
    395.     avctx->width               = sps->output_width;
    396.     avctx->height              = sps->output_height;
    397.     avctx->has_b_frames        = sps->temporal_layer[sps->max_sub_layers - 1].num_reorder_pics;
                                          ^
    398.     avctx->profile             = sps->ptl.general_ptl.profile_idc;
    399.     avctx->level               = sps->ptl.general_ptl.level_idc;
