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

libavcodec/h264.c:1606:1: start of procedure copy_parameter_set()
1604. }
1605. 
1606. static void copy_parameter_set(void **to, void **from, int count, int size)
      ^
1607. {
1608.     int i;

libavcodec/h264.c:1610:10: 
1608.     int i;
1609. 
1610.     for (i = 0; i < count; i++) {
               ^
1611.         if (to[i] && !from[i])
1612.             av_freep(&to[i]);

libavcodec/h264.c:1610:17: Loop condition is true. Entering loop body
1608.     int i;
1609. 
1610.     for (i = 0; i < count; i++) {
                      ^
1611.         if (to[i] && !from[i])
1612.             av_freep(&to[i]);

libavcodec/h264.c:1611:13: Taking false branch
1609. 
1610.     for (i = 0; i < count; i++) {
1611.         if (to[i] && !from[i])
                  ^
1612.             av_freep(&to[i]);
1613.         else if (from[i] && !to[i])

libavcodec/h264.c:1613:18: Taking true branch
1611.         if (to[i] && !from[i])
1612.             av_freep(&to[i]);
1613.         else if (from[i] && !to[i])
                       ^
1614.             to[i] = av_malloc(size);
1615. 

libavcodec/h264.c:1613:30: Taking true branch
1611.         if (to[i] && !from[i])
1612.             av_freep(&to[i]);
1613.         else if (from[i] && !to[i])
                                   ^
1614.             to[i] = av_malloc(size);
1615. 

libavcodec/h264.c:1614:13: 
1612.             av_freep(&to[i]);
1613.         else if (from[i] && !to[i])
1614.             to[i] = av_malloc(size);
                  ^
1615. 
1616.         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:1616:13: Taking true branch
1614.             to[i] = av_malloc(size);
1615. 
1616.         if (from[i])
                  ^
1617.             memcpy(to[i], from[i], size);
1618.     }

libavcodec/h264.c:1617:13: 
1615. 
1616.         if (from[i])
1617.             memcpy(to[i], from[i], size);
                  ^
1618.     }
1619. }
