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

libavcodec/h264.c:1436:1: start of procedure copy_parameter_set()
1434. }
1435. 
1436. static void copy_parameter_set(void **to, void **from, int count, int size)
      ^
1437. {
1438.     int i;

libavcodec/h264.c:1440:10: 
1438.     int i;
1439. 
1440.     for (i = 0; i < count; i++) {
               ^
1441.         if (to[i] && !from[i])
1442.             av_freep(&to[i]);

libavcodec/h264.c:1440:17: Loop condition is true. Entering loop body
1438.     int i;
1439. 
1440.     for (i = 0; i < count; i++) {
                      ^
1441.         if (to[i] && !from[i])
1442.             av_freep(&to[i]);

libavcodec/h264.c:1441:13: Taking false branch
1439. 
1440.     for (i = 0; i < count; i++) {
1441.         if (to[i] && !from[i])
                  ^
1442.             av_freep(&to[i]);
1443.         else if (from[i] && !to[i])

libavcodec/h264.c:1443:18: Taking true branch
1441.         if (to[i] && !from[i])
1442.             av_freep(&to[i]);
1443.         else if (from[i] && !to[i])
                       ^
1444.             to[i] = av_malloc(size);
1445. 

libavcodec/h264.c:1443:30: Taking true branch
1441.         if (to[i] && !from[i])
1442.             av_freep(&to[i]);
1443.         else if (from[i] && !to[i])
                                   ^
1444.             to[i] = av_malloc(size);
1445. 

libavcodec/h264.c:1444:13: 
1442.             av_freep(&to[i]);
1443.         else if (from[i] && !to[i])
1444.             to[i] = av_malloc(size);
                  ^
1445. 
1446.         if (from[i])

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

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

libavutil/mem.c:69:9: Taking true branch
  67. 
  68.     /* let's disallow possible ambiguous cases */
  69.     if (size > (INT_MAX - 32) || !size)
              ^
  70.         return NULL;
  71. 

libavutil/mem.c:70:9: 
  68.     /* let's disallow possible ambiguous cases */
  69.     if (size > (INT_MAX - 32) || !size)
  70.         return NULL;
              ^
  71. 
  72. #if CONFIG_MEMALIGN_HACK

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

libavcodec/h264.c:1446:13: Taking true branch
1444.             to[i] = av_malloc(size);
1445. 
1446.         if (from[i])
                  ^
1447.             memcpy(to[i], from[i], size);
1448.     }

libavcodec/h264.c:1447:13: 
1445. 
1446.         if (from[i])
1447.             memcpy(to[i], from[i], size);
                  ^
1448.     }
1449. }
