libavcodec/wmavoice.c:1659: error: Null Dereference
  pointer `gb->buffer` last assigned on line 1652 could be null and is dereferenced by call to `get_bits1()` at line 1659, column 10.

libavcodec/wmavoice.c:1644:1: start of procedure check_bits_for_superframe()
1642.  * @return -1 if unsupported, 1 on not enough bits or 0 if OK.
1643.  */
1644. static int check_bits_for_superframe(GetBitContext *orig_gb,
      ^
1645.                                      WMAVoiceContext *s)
1646. {

libavcodec/wmavoice.c:1647:5: 
1645.                                      WMAVoiceContext *s)
1646. {
1647.     GetBitContext s_gb, *gb = &s_gb;
          ^
1648.     int n, need_bits, bd_idx;
1649.     const struct frame_type_desc *frame_desc;

libavcodec/wmavoice.c:1652:5: 
1650. 
1651.     /* initialize a copy */
1652.     init_get_bits(gb, orig_gb->buffer, orig_gb->size_in_bits);
          ^
1653.     skip_bits_long(gb, get_bits_count(orig_gb));
1654.     assert(get_bits_left(gb) == get_bits_left(orig_gb));

libavcodec/get_bits.h:306:1: start of procedure init_get_bits()
  304.  * responsible for checking for the buffer end yourself (take advantage of the padding)!
  305.  */
  306. static inline void init_get_bits(GetBitContext *s,
       ^
  307.                    const uint8_t *buffer, int bit_size)
  308. {

libavcodec/get_bits.h:309:5: 
  307.                    const uint8_t *buffer, int bit_size)
  308. {
  309.     int buffer_size = (bit_size+7)>>3;
           ^
  310.     if (buffer_size < 0 || bit_size < 0) {
  311.         buffer_size = bit_size = 0;

libavcodec/get_bits.h:310:9: Taking true branch
  308. {
  309.     int buffer_size = (bit_size+7)>>3;
  310.     if (buffer_size < 0 || bit_size < 0) {
               ^
  311.         buffer_size = bit_size = 0;
  312.         buffer = NULL;

libavcodec/get_bits.h:311:9: 
  309.     int buffer_size = (bit_size+7)>>3;
  310.     if (buffer_size < 0 || bit_size < 0) {
  311.         buffer_size = bit_size = 0;
               ^
  312.         buffer = NULL;
  313.     }

libavcodec/get_bits.h:312:9: 
  310.     if (buffer_size < 0 || bit_size < 0) {
  311.         buffer_size = bit_size = 0;
  312.         buffer = NULL;
               ^
  313.     }
  314. 

libavcodec/get_bits.h:315:5: 
  313.     }
  314. 
  315.     s->buffer       = buffer;
           ^
  316.     s->size_in_bits = bit_size;
  317.     s->buffer_end   = buffer + buffer_size;

libavcodec/get_bits.h:316:5: 
  314. 
  315.     s->buffer       = buffer;
  316.     s->size_in_bits = bit_size;
           ^
  317.     s->buffer_end   = buffer + buffer_size;
  318.     s->index        = 0;

libavcodec/get_bits.h:317:5: 
  315.     s->buffer       = buffer;
  316.     s->size_in_bits = bit_size;
  317.     s->buffer_end   = buffer + buffer_size;
           ^
  318.     s->index        = 0;
  319. }

libavcodec/get_bits.h:318:5: 
  316.     s->size_in_bits = bit_size;
  317.     s->buffer_end   = buffer + buffer_size;
  318.     s->index        = 0;
           ^
  319. }
  320. 

libavcodec/get_bits.h:319:1: return from a call to init_get_bits
  317.     s->buffer_end   = buffer + buffer_size;
  318.     s->index        = 0;
  319. }
       ^
  320. 
  321. static inline void align_get_bits(GetBitContext *s)

libavcodec/wmavoice.c:1653:5: 
1651.     /* initialize a copy */
1652.     init_get_bits(gb, orig_gb->buffer, orig_gb->size_in_bits);
1653.     skip_bits_long(gb, get_bits_count(orig_gb));
          ^
1654.     assert(get_bits_left(gb) == get_bits_left(orig_gb));
1655. 

libavcodec/get_bits.h:162:1: start of procedure get_bits_count()
  160. #   define GET_CACHE(name, gb) ((uint32_t)name##_cache)
  161. 
  162. static inline int get_bits_count(const GetBitContext *s){
       ^
  163.     return s->index;
  164. }

libavcodec/get_bits.h:163:5: 
  161. 
  162. static inline int get_bits_count(const GetBitContext *s){
  163.     return s->index;
           ^
  164. }
  165. 

libavcodec/get_bits.h:164:1: return from a call to get_bits_count
  162. static inline int get_bits_count(const GetBitContext *s){
  163.     return s->index;
  164. }
       ^
  165. 
  166. static inline void skip_bits_long(GetBitContext *s, int n){

libavcodec/get_bits.h:166:1: start of procedure skip_bits_long()
  164. }
  165. 
  166. static inline void skip_bits_long(GetBitContext *s, int n){
       ^
  167.     s->index += n;
  168. }

libavcodec/get_bits.h:167:5: 
  165. 
  166. static inline void skip_bits_long(GetBitContext *s, int n){
  167.     s->index += n;
           ^
  168. }
  169. 

libavcodec/get_bits.h:168:1: return from a call to skip_bits_long
  166. static inline void skip_bits_long(GetBitContext *s, int n){
  167.     s->index += n;
  168. }
       ^
  169. 
  170. /**

libavcodec/wmavoice.c:1654:5: 
1652.     init_get_bits(gb, orig_gb->buffer, orig_gb->size_in_bits);
1653.     skip_bits_long(gb, get_bits_count(orig_gb));
1654.     assert(get_bits_left(gb) == get_bits_left(orig_gb));
          ^
1655. 
1656.     /* superframe header */

libavcodec/wmavoice.c:1657:9: 
1655. 
1656.     /* superframe header */
1657.     if (get_bits_left(gb) < 14)
              ^
1658.         return 1;
1659.     if (!get_bits1(gb))

libavcodec/get_bits.h:452:1: start of procedure get_bits_left()
  450. }
  451. 
  452. static inline int get_bits_left(GetBitContext *gb)
       ^
  453. {
  454.     return gb->size_in_bits - get_bits_count(gb);

libavcodec/get_bits.h:454:5: 
  452. static inline int get_bits_left(GetBitContext *gb)
  453. {
  454.     return gb->size_in_bits - get_bits_count(gb);
           ^
  455. }
  456. 

libavcodec/get_bits.h:162:1: start of procedure get_bits_count()
    160. #   define GET_CACHE(name, gb) ((uint32_t)name##_cache)
    161. 
    162. static inline int get_bits_count(const GetBitContext *s){
         ^
    163.     return s->index;
    164. }

libavcodec/get_bits.h:163:5: 
    161. 
    162. static inline int get_bits_count(const GetBitContext *s){
    163.     return s->index;
             ^
    164. }
    165. 

libavcodec/get_bits.h:164:1: return from a call to get_bits_count
    162. static inline int get_bits_count(const GetBitContext *s){
    163.     return s->index;
    164. }
         ^
    165. 
    166. static inline void skip_bits_long(GetBitContext *s, int n){

libavcodec/get_bits.h:455:1: return from a call to get_bits_left
  453. {
  454.     return gb->size_in_bits - get_bits_count(gb);
  455. }
       ^
  456. 
  457. //#define TRACE

libavcodec/wmavoice.c:1657:9: Taking false branch
1655. 
1656.     /* superframe header */
1657.     if (get_bits_left(gb) < 14)
              ^
1658.         return 1;
1659.     if (!get_bits1(gb))

libavcodec/wmavoice.c:1659:10: 
1657.     if (get_bits_left(gb) < 14)
1658.         return 1;
1659.     if (!get_bits1(gb))
               ^
1660.         return -1;                        // WMAPro-in-WMAVoice superframe
1661.     if (get_bits1(gb)) skip_bits(gb, 12); // number of  samples in superframe

libavcodec/get_bits.h:230:1: start of procedure get_bits1()
  228. }
  229. 
  230. static inline unsigned int get_bits1(GetBitContext *s){
       ^
  231.     unsigned int index = s->index;
  232.     uint8_t result = s->buffer[index>>3];

libavcodec/get_bits.h:231:5: 
  229. 
  230. static inline unsigned int get_bits1(GetBitContext *s){
  231.     unsigned int index = s->index;
           ^
  232.     uint8_t result = s->buffer[index>>3];
  233. #ifdef ALT_BITSTREAM_READER_LE

libavcodec/get_bits.h:232:5: 
  230. static inline unsigned int get_bits1(GetBitContext *s){
  231.     unsigned int index = s->index;
  232.     uint8_t result = s->buffer[index>>3];
           ^
  233. #ifdef ALT_BITSTREAM_READER_LE
  234.     result >>= index & 7;
