libavcodec/vorbis_enc.c:175: error: Null Dereference
  pointer `cb->pow2` last assigned on line 157 could be null and is dereferenced at line 175, column 13.

libavcodec/vorbis_enc.c:146:1: start of procedure ready_codebook()
144. }
145. 
146. static void ready_codebook(vorbis_enc_codebook *cb)
     ^
147. {
148.     int i;

libavcodec/vorbis_enc.c:150:5: Skipping ff_vorbis_len2vlc(): empty list of specs
148.     int i;
149. 
150.     ff_vorbis_len2vlc(cb->lens, cb->codewords, cb->nentries);
         ^
151. 
152.     if (!cb->lookup) {

libavcodec/vorbis_enc.c:152:10: Taking false branch
150.     ff_vorbis_len2vlc(cb->lens, cb->codewords, cb->nentries);
151. 
152.     if (!cb->lookup) {
              ^
153.         cb->pow2 = cb->dimentions = NULL;
154.     } else {

libavcodec/vorbis_enc.c:155:9: 
153.         cb->pow2 = cb->dimentions = NULL;
154.     } else {
155.         int vals = cb_lookup_vals(cb->lookup, cb->ndimentions, cb->nentries);
             ^
156.         cb->dimentions = av_malloc(sizeof(float) * cb->nentries * cb->ndimentions);
157.         cb->pow2 = av_mallocz(sizeof(float) * cb->nentries);

libavcodec/vorbis_enc.c:137:1: start of procedure cb_lookup_vals()
  135. }
  136. 
  137. static int cb_lookup_vals(int lookup, int dimentions, int entries)
       ^
  138. {
  139.     if (lookup == 1)

libavcodec/vorbis_enc.c:139:9: Taking false branch
  137. static int cb_lookup_vals(int lookup, int dimentions, int entries)
  138. {
  139.     if (lookup == 1)
               ^
  140.         return ff_vorbis_nth_root(entries, dimentions);
  141.     else if (lookup == 2)

libavcodec/vorbis_enc.c:141:14: Taking false branch
  139.     if (lookup == 1)
  140.         return ff_vorbis_nth_root(entries, dimentions);
  141.     else if (lookup == 2)
                    ^
  142.         return dimentions *entries;
  143.     return 0;

libavcodec/vorbis_enc.c:143:5: 
  141.     else if (lookup == 2)
  142.         return dimentions *entries;
  143.     return 0;
           ^
  144. }
  145. 

libavcodec/vorbis_enc.c:144:1: return from a call to cb_lookup_vals
  142.         return dimentions *entries;
  143.     return 0;
  144. }
       ^
  145. 
  146. static void ready_codebook(vorbis_enc_codebook *cb)

libavcodec/vorbis_enc.c:156:9: 
154.     } else {
155.         int vals = cb_lookup_vals(cb->lookup, cb->ndimentions, cb->nentries);
156.         cb->dimentions = av_malloc(sizeof(float) * cb->nentries * cb->ndimentions);
             ^
157.         cb->pow2 = av_mallocz(sizeof(float) * cb->nentries);
158.         for (i = 0; i < cb->nentries; i++) {

libavutil/mem.c:47:1: start of procedure av_malloc()
  45.    linker will do it automatically. */
  46. 
  47. void *av_malloc(unsigned int size)
      ^
  48. {
  49.     void *ptr = NULL;

libavutil/mem.c:49:5: 
  47. void *av_malloc(unsigned int size)
  48. {
  49.     void *ptr = NULL;
          ^
  50. #if CONFIG_MEMALIGN_HACK
  51.     long diff;

libavutil/mem.c:55:8: Taking false branch
  53. 
  54.     /* let's disallow possible ambiguous cases */
  55.     if(size > (INT_MAX-16) )
             ^
  56.         return NULL;
  57. 

libavutil/mem.c:66:9: Taking false branch
  64.     ((char*)ptr)[-1]= diff;
  65. #elif HAVE_POSIX_MEMALIGN
  66.     if (posix_memalign(&ptr,16,size))
              ^
  67.         ptr = NULL;
  68. #elif HAVE_MEMALIGN

libavutil/mem.c:99:5: 
   97.     ptr = malloc(size);
   98. #endif
   99.     return ptr;
           ^
  100. }
  101. 

libavutil/mem.c:100:1: return from a call to av_malloc
   98. #endif
   99.     return ptr;
  100. }
       ^
  101. 
  102. void *av_realloc(void *ptr, unsigned int size)

libavcodec/vorbis_enc.c:157:9: 
155.         int vals = cb_lookup_vals(cb->lookup, cb->ndimentions, cb->nentries);
156.         cb->dimentions = av_malloc(sizeof(float) * cb->nentries * cb->ndimentions);
157.         cb->pow2 = av_mallocz(sizeof(float) * cb->nentries);
             ^
158.         for (i = 0; i < cb->nentries; i++) {
159.             float last = 0;

libavutil/mem.c:140:1: start of procedure av_mallocz()
  138. }
  139. 
  140. void *av_mallocz(unsigned int size)
       ^
  141. {
  142.     void *ptr = av_malloc(size);

libavutil/mem.c:142:5: 
  140. void *av_mallocz(unsigned int size)
  141. {
  142.     void *ptr = av_malloc(size);
           ^
  143.     if (ptr)
  144.         memset(ptr, 0, size);

libavutil/mem.c:47:1: start of procedure av_malloc()
    45.    linker will do it automatically. */
    46. 
    47. void *av_malloc(unsigned int size)
        ^
    48. {
    49.     void *ptr = NULL;

libavutil/mem.c:49:5: 
    47. void *av_malloc(unsigned int size)
    48. {
    49.     void *ptr = NULL;
            ^
    50. #if CONFIG_MEMALIGN_HACK
    51.     long diff;

libavutil/mem.c:55:8: Taking true branch
    53. 
    54.     /* let's disallow possible ambiguous cases */
    55.     if(size > (INT_MAX-16) )
               ^
    56.         return NULL;
    57. 

libavutil/mem.c:56:9: 
    54.     /* let's disallow possible ambiguous cases */
    55.     if(size > (INT_MAX-16) )
    56.         return NULL;
                ^
    57. 
    58. #if CONFIG_MEMALIGN_HACK

libavutil/mem.c:100:1: return from a call to av_malloc
     98. #endif
     99.     return ptr;
    100. }
         ^
    101. 
    102. void *av_realloc(void *ptr, unsigned int size)

libavutil/mem.c:143:9: Taking false branch
  141. {
  142.     void *ptr = av_malloc(size);
  143.     if (ptr)
               ^
  144.         memset(ptr, 0, size);
  145.     return ptr;

libavutil/mem.c:145:5: 
  143.     if (ptr)
  144.         memset(ptr, 0, size);
  145.     return ptr;
           ^
  146. }
  147. 

libavutil/mem.c:146:1: return from a call to av_mallocz
  144.         memset(ptr, 0, size);
  145.     return ptr;
  146. }
       ^
  147. 
  148. char *av_strdup(const char *s)

libavcodec/vorbis_enc.c:158:14: 
156.         cb->dimentions = av_malloc(sizeof(float) * cb->nentries * cb->ndimentions);
157.         cb->pow2 = av_mallocz(sizeof(float) * cb->nentries);
158.         for (i = 0; i < cb->nentries; i++) {
                  ^
159.             float last = 0;
160.             int j;

libavcodec/vorbis_enc.c:158:21: Loop condition is true. Entering loop body
156.         cb->dimentions = av_malloc(sizeof(float) * cb->nentries * cb->ndimentions);
157.         cb->pow2 = av_mallocz(sizeof(float) * cb->nentries);
158.         for (i = 0; i < cb->nentries; i++) {
                         ^
159.             float last = 0;
160.             int j;

libavcodec/vorbis_enc.c:159:13: 
157.         cb->pow2 = av_mallocz(sizeof(float) * cb->nentries);
158.         for (i = 0; i < cb->nentries; i++) {
159.             float last = 0;
                 ^
160.             int j;
161.             int div = 1;

libavcodec/vorbis_enc.c:161:13: 
159.             float last = 0;
160.             int j;
161.             int div = 1;
                 ^
162.             for (j = 0; j < cb->ndimentions; j++) {
163.                 int off;

libavcodec/vorbis_enc.c:162:18: 
160.             int j;
161.             int div = 1;
162.             for (j = 0; j < cb->ndimentions; j++) {
                      ^
163.                 int off;
164.                 if (cb->lookup == 1)

libavcodec/vorbis_enc.c:162:25: Loop condition is false. Leaving loop
160.             int j;
161.             int div = 1;
162.             for (j = 0; j < cb->ndimentions; j++) {
                             ^
163.                 int off;
164.                 if (cb->lookup == 1)

libavcodec/vorbis_enc.c:175:13: 
173.                 div *= vals;
174.             }
175.             cb->pow2[i] /= 2.;
                 ^
176.         }
177.     }
