libavcodec/h264.c:1277: error: Null Dereference
  pointer `*to[i]` last assigned on line 1274 could be null and is dereferenced by call to `memcpy()` at line 1277, column 13.

libavcodec/h264.c:1266:1: start of procedure copy_parameter_set()
1264. }
1265. 
1266. static void copy_parameter_set(void **to, void **from, int count, int size)
      ^
1267. {
1268.     int i;

libavcodec/h264.c:1270:10: 
1268.     int i;
1269. 
1270.     for (i = 0; i < count; i++) {
               ^
1271.         if (to[i] && !from[i])
1272.             av_freep(&to[i]);

libavcodec/h264.c:1270:17: Loop condition is true. Entering loop body
1268.     int i;
1269. 
1270.     for (i = 0; i < count; i++) {
                      ^
1271.         if (to[i] && !from[i])
1272.             av_freep(&to[i]);

libavcodec/h264.c:1271:13: Taking false branch
1269. 
1270.     for (i = 0; i < count; i++) {
1271.         if (to[i] && !from[i])
                  ^
1272.             av_freep(&to[i]);
1273.         else if (from[i] && !to[i])

libavcodec/h264.c:1273:18: Taking true branch
1271.         if (to[i] && !from[i])
1272.             av_freep(&to[i]);
1273.         else if (from[i] && !to[i])
                       ^
1274.             to[i] = av_malloc(size);
1275. 

libavcodec/h264.c:1273:30: Taking true branch
1271.         if (to[i] && !from[i])
1272.             av_freep(&to[i]);
1273.         else if (from[i] && !to[i])
                                   ^
1274.             to[i] = av_malloc(size);
1275. 

libavcodec/h264.c:1274:13: 
1272.             av_freep(&to[i]);
1273.         else if (from[i] && !to[i])
1274.             to[i] = av_malloc(size);
                  ^
1275. 
1276.         if (from[i])

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-32) )
             ^
  73.         return NULL;
  74. 

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

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

libavcodec/h264.c:1276:13: Taking true branch
1274.             to[i] = av_malloc(size);
1275. 
1276.         if (from[i])
                  ^
1277.             memcpy(to[i], from[i], size);
1278.     }

libavcodec/h264.c:1277:13: 
1275. 
1276.         if (from[i])
1277.             memcpy(to[i], from[i], size);
                  ^
1278.     }
1279. }
