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

libavcodec/vorbis_enc.c:141:1: start of procedure ready_codebook()
139. }
140. 
141. static void ready_codebook(vorbis_enc_codebook * cb) {
     ^
142.     int i;
143. 

libavcodec/vorbis_enc.c:144:5: Skipping ff_vorbis_len2vlc(): empty list of specs
142.     int i;
143. 
144.     ff_vorbis_len2vlc(cb->lens, cb->codewords, cb->nentries);
         ^
145. 
146.     if (!cb->lookup)

libavcodec/vorbis_enc.c:146:10: Taking false branch
144.     ff_vorbis_len2vlc(cb->lens, cb->codewords, cb->nentries);
145. 
146.     if (!cb->lookup)
              ^
147.         cb->pow2 = cb->dimentions = NULL;
148.     else {

libavcodec/vorbis_enc.c:149:9: 
147.         cb->pow2 = cb->dimentions = NULL;
148.     else {
149.         int vals = cb_lookup_vals(cb->lookup, cb->ndimentions, cb->nentries);
             ^
150.         cb->dimentions = av_malloc(sizeof(float) * cb->nentries * cb->ndimentions);
151.         cb->pow2 = av_mallocz(sizeof(float) * cb->nentries);

libavcodec/vorbis_enc.c:135:1: start of procedure cb_lookup_vals()
  133. }
  134. 
  135. static int cb_lookup_vals(int lookup, int dimentions, int entries) {
       ^
  136.     if      (lookup == 1) return ff_vorbis_nth_root(entries, dimentions);
  137.     else if (lookup == 2) return dimentions * entries;

libavcodec/vorbis_enc.c:136:14: Taking false branch
  134. 
  135. static int cb_lookup_vals(int lookup, int dimentions, int entries) {
  136.     if      (lookup == 1) return ff_vorbis_nth_root(entries, dimentions);
                    ^
  137.     else if (lookup == 2) return dimentions * entries;
  138.     return 0;

libavcodec/vorbis_enc.c:137:14: Taking true branch
  135. static int cb_lookup_vals(int lookup, int dimentions, int entries) {
  136.     if      (lookup == 1) return ff_vorbis_nth_root(entries, dimentions);
  137.     else if (lookup == 2) return dimentions * entries;
                    ^
  138.     return 0;
  139. }

libavcodec/vorbis_enc.c:137:27: 
  135. static int cb_lookup_vals(int lookup, int dimentions, int entries) {
  136.     if      (lookup == 1) return ff_vorbis_nth_root(entries, dimentions);
  137.     else if (lookup == 2) return dimentions * entries;
                                 ^
  138.     return 0;
  139. }

libavcodec/vorbis_enc.c:139:1: return from a call to cb_lookup_vals
  137.     else if (lookup == 2) return dimentions * entries;
  138.     return 0;
  139. }
       ^
  140. 
  141. static void ready_codebook(vorbis_enc_codebook * cb) {

libavcodec/vorbis_enc.c:150:9: 
148.     else {
149.         int vals = cb_lookup_vals(cb->lookup, cb->ndimentions, cb->nentries);
150.         cb->dimentions = av_malloc(sizeof(float) * cb->nentries * cb->ndimentions);
             ^
151.         cb->pow2 = av_mallocz(sizeof(float) * cb->nentries);
152.         for (i = 0; i < cb->nentries; i++) {

libavutil/mem.c:43:1: start of procedure av_malloc()
  41.    linker will do it automatically */
  42. 
  43. void *av_malloc(unsigned int size)
      ^
  44. {
  45.     void *ptr = NULL;

libavutil/mem.c:45:5: 
  43. void *av_malloc(unsigned int size)
  44. {
  45.     void *ptr = NULL;
          ^
  46. #ifdef CONFIG_MEMALIGN_HACK
  47.     long diff;

libavutil/mem.c:51:8: Taking true branch
  49. 
  50.     /* let's disallow possible ambiguous cases */
  51.     if(size > (INT_MAX-16) )
             ^
  52.         return NULL;
  53. 

libavutil/mem.c:52:9: 
  50.     /* let's disallow possible ambiguous cases */
  51.     if(size > (INT_MAX-16) )
  52.         return NULL;
              ^
  53. 
  54. #ifdef CONFIG_MEMALIGN_HACK

libavutil/mem.c:95:1: return from a call to av_malloc
  93. #endif
  94.     return ptr;
  95. }
      ^
  96. 
  97. void *av_realloc(void *ptr, unsigned int size)

libavcodec/vorbis_enc.c:151:9: 
149.         int vals = cb_lookup_vals(cb->lookup, cb->ndimentions, cb->nentries);
150.         cb->dimentions = av_malloc(sizeof(float) * cb->nentries * cb->ndimentions);
151.         cb->pow2 = av_mallocz(sizeof(float) * cb->nentries);
             ^
152.         for (i = 0; i < cb->nentries; i++) {
153.             float last = 0;

libavutil/mem.c:135:1: start of procedure av_mallocz()
  133. }
  134. 
  135. void *av_mallocz(unsigned int size)
       ^
  136. {
  137.     void *ptr = av_malloc(size);

libavutil/mem.c:137:5: 
  135. void *av_mallocz(unsigned int size)
  136. {
  137.     void *ptr = av_malloc(size);
           ^
  138.     if (ptr)
  139.         memset(ptr, 0, size);

libavutil/mem.c:43:1: start of procedure av_malloc()
    41.    linker will do it automatically */
    42. 
    43. void *av_malloc(unsigned int size)
        ^
    44. {
    45.     void *ptr = NULL;

libavutil/mem.c:45:5: 
    43. void *av_malloc(unsigned int size)
    44. {
    45.     void *ptr = NULL;
            ^
    46. #ifdef CONFIG_MEMALIGN_HACK
    47.     long diff;

libavutil/mem.c:51:8: Taking true branch
    49. 
    50.     /* let's disallow possible ambiguous cases */
    51.     if(size > (INT_MAX-16) )
               ^
    52.         return NULL;
    53. 

libavutil/mem.c:52:9: 
    50.     /* let's disallow possible ambiguous cases */
    51.     if(size > (INT_MAX-16) )
    52.         return NULL;
                ^
    53. 
    54. #ifdef CONFIG_MEMALIGN_HACK

libavutil/mem.c:95:1: return from a call to av_malloc
    93. #endif
    94.     return ptr;
    95. }
        ^
    96. 
    97. void *av_realloc(void *ptr, unsigned int size)

libavutil/mem.c:138:9: Taking false branch
  136. {
  137.     void *ptr = av_malloc(size);
  138.     if (ptr)
               ^
  139.         memset(ptr, 0, size);
  140.     return ptr;

libavutil/mem.c:140:5: 
  138.     if (ptr)
  139.         memset(ptr, 0, size);
  140.     return ptr;
           ^
  141. }
  142. 

libavutil/mem.c:141:1: return from a call to av_mallocz
  139.         memset(ptr, 0, size);
  140.     return ptr;
  141. }
       ^
  142. 
  143. char *av_strdup(const char *s)

libavcodec/vorbis_enc.c:152:14: 
150.         cb->dimentions = av_malloc(sizeof(float) * cb->nentries * cb->ndimentions);
151.         cb->pow2 = av_mallocz(sizeof(float) * cb->nentries);
152.         for (i = 0; i < cb->nentries; i++) {
                  ^
153.             float last = 0;
154.             int j;

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

libavcodec/vorbis_enc.c:153:13: 
151.         cb->pow2 = av_mallocz(sizeof(float) * cb->nentries);
152.         for (i = 0; i < cb->nentries; i++) {
153.             float last = 0;
                 ^
154.             int j;
155.             int div = 1;

libavcodec/vorbis_enc.c:155:13: 
153.             float last = 0;
154.             int j;
155.             int div = 1;
                 ^
156.             for (j = 0; j < cb->ndimentions; j++) {
157.                 int off;

libavcodec/vorbis_enc.c:156:18: 
154.             int j;
155.             int div = 1;
156.             for (j = 0; j < cb->ndimentions; j++) {
                      ^
157.                 int off;
158.                 if (cb->lookup == 1)

libavcodec/vorbis_enc.c:156:25: Loop condition is false. Leaving loop
154.             int j;
155.             int div = 1;
156.             for (j = 0; j < cb->ndimentions; j++) {
                             ^
157.                 int off;
158.                 if (cb->lookup == 1)

libavcodec/vorbis_enc.c:169:13: 
167.                 div *= vals;
168.             }
169.             cb->pow2[i] /= 2.;
                 ^
170.         }
171.     }
