libavcodec/assdec.c:30: error: Null Dereference
  pointer `avctx->subtitle_header` last assigned on line 27 could be null and is dereferenced by call to `memcpy()` at line 30, column 5.

libavcodec/assdec.c:25:1: start of procedure ass_decode_init()
23. #include "ass.h"
24. 
25. static av_cold int ass_decode_init(AVCodecContext *avctx)
    ^
26. {
27.     avctx->subtitle_header = av_malloc(avctx->extradata_size);

libavcodec/assdec.c:27:5: 
25. static av_cold int ass_decode_init(AVCodecContext *avctx)
26. {
27.     avctx->subtitle_header = av_malloc(avctx->extradata_size);
        ^
28.     if (!avctx->extradata)
29.         return AVERROR(ENOMEM);

libavutil/mem.c:64:1: start of procedure av_malloc()
  62.    linker will do it automatically. */
  63. 
  64. void *av_malloc(size_t size)
      ^
  65. {
  66.     void *ptr = NULL;

libavutil/mem.c:66:5: 
  64. void *av_malloc(size_t size)
  65. {
  66.     void *ptr = NULL;
          ^
  67. #if CONFIG_MEMALIGN_HACK
  68.     long diff;

libavutil/mem.c:72:8: Taking true branch
  70. 
  71.     /* let's disallow possible ambiguous cases */
  72.     if(size > (INT_MAX-16) )
             ^
  73.         return NULL;
  74. 

libavutil/mem.c:73:9: 
  71.     /* let's disallow possible ambiguous cases */
  72.     if(size > (INT_MAX-16) )
  73.         return NULL;
              ^
  74. 
  75. #if CONFIG_MEMALIGN_HACK

libavutil/mem.c:117:1: return from a call to av_malloc
  115. #endif
  116.     return ptr;
  117. }
       ^
  118. 
  119. void *av_realloc(void *ptr, size_t size)

libavcodec/assdec.c:28:10: Taking false branch
26. {
27.     avctx->subtitle_header = av_malloc(avctx->extradata_size);
28.     if (!avctx->extradata)
             ^
29.         return AVERROR(ENOMEM);
30.     memcpy(avctx->subtitle_header, avctx->extradata, avctx->extradata_size);

libavcodec/assdec.c:30:5: 
28.     if (!avctx->extradata)
29.         return AVERROR(ENOMEM);
30.     memcpy(avctx->subtitle_header, avctx->extradata, avctx->extradata_size);
        ^
31.     avctx->subtitle_header_size = avctx->extradata_size;
32.     return 0;
