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

libavcodec/h264.c:1099:1: start of procedure copy_parameter_set()
1097. }
1098. 
1099. static void copy_parameter_set(void **to, void **from, int count, int size)
      ^
1100. {
1101.     int i;

libavcodec/h264.c:1103:10: 
1101.     int i;
1102. 
1103.     for (i = 0; i < count; i++) {
               ^
1104.         if (to[i] && !from[i])
1105.             av_freep(&to[i]);

libavcodec/h264.c:1103:17: Loop condition is true. Entering loop body
1101.     int i;
1102. 
1103.     for (i = 0; i < count; i++) {
                      ^
1104.         if (to[i] && !from[i])
1105.             av_freep(&to[i]);

libavcodec/h264.c:1104:13: Taking false branch
1102. 
1103.     for (i = 0; i < count; i++) {
1104.         if (to[i] && !from[i])
                  ^
1105.             av_freep(&to[i]);
1106.         else if (from[i] && !to[i])

libavcodec/h264.c:1106:18: Taking true branch
1104.         if (to[i] && !from[i])
1105.             av_freep(&to[i]);
1106.         else if (from[i] && !to[i])
                       ^
1107.             to[i] = av_malloc(size);
1108. 

libavcodec/h264.c:1106:30: Taking true branch
1104.         if (to[i] && !from[i])
1105.             av_freep(&to[i]);
1106.         else if (from[i] && !to[i])
                                   ^
1107.             to[i] = av_malloc(size);
1108. 

libavcodec/h264.c:1107:13: 
1105.             av_freep(&to[i]);
1106.         else if (from[i] && !to[i])
1107.             to[i] = av_malloc(size);
                  ^
1108. 
1109.         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:71:5: 
  69. #endif
  70. 
  71.     assert(size);
          ^
  72. 
  73.     /* let's disallow possible ambiguous cases */

libavutil/mem.c:74:9: Taking true branch
  72. 
  73.     /* let's disallow possible ambiguous cases */
  74.     if (size > (INT_MAX-32) || !size)
              ^
  75.         return NULL;
  76. 

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

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

libavcodec/h264.c:1109:13: Taking true branch
1107.             to[i] = av_malloc(size);
1108. 
1109.         if (from[i])
                  ^
1110.             memcpy(to[i], from[i], size);
1111.     }

libavcodec/h264.c:1110:13: 
1108. 
1109.         if (from[i])
1110.             memcpy(to[i], from[i], size);
                  ^
1111.     }
1112. }
