avconv.c:2754: error: Null Dereference
  pointer `o->attachments` last assigned on line 2752 could be null and is dereferenced at line 2754, column 5.

avconv.c:2750:1: start of procedure opt_attach()
2748. }
2749. 
2750. static int opt_attach(OptionsContext *o, const char *opt, const char *arg)
      ^
2751. {
2752.     o->attachments = grow_array(o->attachments, sizeof(*o->attachments),

avconv.c:2752:5: 
2750. static int opt_attach(OptionsContext *o, const char *opt, const char *arg)
2751. {
2752.     o->attachments = grow_array(o->attachments, sizeof(*o->attachments),
          ^
2753.                                 &o->nb_attachments, o->nb_attachments + 1);
2754.     o->attachments[o->nb_attachments - 1] = arg;

cmdutils.c:1056:1: start of procedure grow_array()
  1054. #endif /* CONFIG_AVFILTER */
  1055. 
  1056. void *grow_array(void *array, int elem_size, int *size, int new_size)
        ^
  1057. {
  1058.     if (new_size >= INT_MAX / elem_size) {

cmdutils.c:1058:9: Taking true branch
  1056. void *grow_array(void *array, int elem_size, int *size, int new_size)
  1057. {
  1058.     if (new_size >= INT_MAX / elem_size) {
                ^
  1059.         av_log(NULL, AV_LOG_ERROR, "Array too big.\n");
  1060.         exit_program(1);

cmdutils.c:1059:9: Skipping av_log(): empty list of specs
  1057. {
  1058.     if (new_size >= INT_MAX / elem_size) {
  1059.         av_log(NULL, AV_LOG_ERROR, "Array too big.\n");
                ^
  1060.         exit_program(1);
  1061.     }

cmdutils.c:1060:9: Skipping exit_program(): empty list of specs
  1058.     if (new_size >= INT_MAX / elem_size) {
  1059.         av_log(NULL, AV_LOG_ERROR, "Array too big.\n");
  1060.         exit_program(1);
                ^
  1061.     }
  1062.     if (*size < new_size) {

cmdutils.c:1062:9: Taking true branch
  1060.         exit_program(1);
  1061.     }
  1062.     if (*size < new_size) {
                ^
  1063.         uint8_t *tmp = av_realloc(array, new_size*elem_size);
  1064.         if (!tmp) {

cmdutils.c:1063:9: 
  1061.     }
  1062.     if (*size < new_size) {
  1063.         uint8_t *tmp = av_realloc(array, new_size*elem_size);
                ^
  1064.         if (!tmp) {
  1065.             av_log(NULL, AV_LOG_ERROR, "Could not alloc buffer.\n");

libavutil/mem.c:117:1: start of procedure av_realloc()
    115. }
    116. 
    117. void *av_realloc(void *ptr, size_t size)
         ^
    118. {
    119. #if CONFIG_MEMALIGN_HACK

libavutil/mem.c:124:8: Taking false branch
    122. 
    123.     /* let's disallow possible ambiguous cases */
    124.     if(size > (INT_MAX-16) )
                ^
    125.         return NULL;
    126. 

libavutil/mem.c:133:5: 
    131.     return (char*)realloc((char*)ptr - diff, size + diff) + diff;
    132. #else
    133.     return realloc(ptr, size);
             ^
    134. #endif
    135. }

libavutil/mem.c:135:1: return from a call to av_realloc
    133.     return realloc(ptr, size);
    134. #endif
    135. }
         ^
    136. 
    137. void av_free(void *ptr)

cmdutils.c:1064:14: Taking true branch
  1062.     if (*size < new_size) {
  1063.         uint8_t *tmp = av_realloc(array, new_size*elem_size);
  1064.         if (!tmp) {
                     ^
  1065.             av_log(NULL, AV_LOG_ERROR, "Could not alloc buffer.\n");
  1066.             exit_program(1);

cmdutils.c:1065:13: Skipping av_log(): empty list of specs
  1063.         uint8_t *tmp = av_realloc(array, new_size*elem_size);
  1064.         if (!tmp) {
  1065.             av_log(NULL, AV_LOG_ERROR, "Could not alloc buffer.\n");
                    ^
  1066.             exit_program(1);
  1067.         }

cmdutils.c:1066:13: Skipping exit_program(): empty list of specs
  1064.         if (!tmp) {
  1065.             av_log(NULL, AV_LOG_ERROR, "Could not alloc buffer.\n");
  1066.             exit_program(1);
                    ^
  1067.         }
  1068.         memset(tmp + *size*elem_size, 0, (new_size-*size) * elem_size);

cmdutils.c:1068:9: 
  1066.             exit_program(1);
  1067.         }
  1068.         memset(tmp + *size*elem_size, 0, (new_size-*size) * elem_size);
                ^
  1069.         *size = new_size;
  1070.         return tmp;

cmdutils.c:1069:9: 
  1067.         }
  1068.         memset(tmp + *size*elem_size, 0, (new_size-*size) * elem_size);
  1069.         *size = new_size;
                ^
  1070.         return tmp;
  1071.     }

cmdutils.c:1070:9: 
  1068.         memset(tmp + *size*elem_size, 0, (new_size-*size) * elem_size);
  1069.         *size = new_size;
  1070.         return tmp;
                ^
  1071.     }
  1072.     return array;

cmdutils.c:1073:1: return from a call to grow_array
  1071.     }
  1072.     return array;
  1073. }
        ^

avconv.c:2754:5: 
2752.     o->attachments = grow_array(o->attachments, sizeof(*o->attachments),
2753.                                 &o->nb_attachments, o->nb_attachments + 1);
2754.     o->attachments[o->nb_attachments - 1] = arg;
          ^
2755.     return 0;
2756. }
